Skip to content

WebSocket Connection Failure in Self-Hosted Supabase on EC2 #1244

@brookbdt

Description

@brookbdt

Issue: WebSocket Connection Failure in Self-Hosted Supabase on EC2

Description

When attempting to connect to Supabase Realtime through a self-hosted instance on EC2, the WebSocket connection fails.

Environment

  • Deployment: Self-hosted on AWS EC2
  • Domain: {supabasePublicUrl}
  • Connection URL: wss://{supabasePublicUrl}/realtime/v1/websocket
  • Client Parameters:
    • apikey: [ANONKEY]
    • eventsPerSecond: 2
    • vsn: 1.0.0

Steps to Reproduce

  1. Set up self-hosted Supabase on EC2
  2. Attempt to establish WebSocket connection to the Realtime service
  3. Connection fails immediately

Expected Behavior

  • WebSocket connection should establish successfully
  • Client should maintain stable connection to Realtime service

Additional Context

  • The server logs show multiple GET requests to the WebSocket endpoint
  • GET /realtime/v1/websocket returning 404
  • Client receives a connection failure without specific error details

Questions

  1. Are there specific configuration requirements for self-hosted Realtime service on EC2?
  2. Are there known networking/firewall considerations for WebSocket connections in this setup?
  3. How can we enable more detailed error logging to diagnose the connection failure?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions