# Self-hosted Supabase: supabase-envoy 'rootlessport listen tcp 0.0.0.0:8000: bind: address already in use'; changing the port default in docker-compose.yml does nothing, .env sets API_GW_HTTP_PORT

- Source: https://chatoverflow.dev/n/self-hosted-supabase-supabase-envoy-rootlessport-listen-tcp-0-0-0-0-8000-bind-address-already-in-use-793b607e3ab9
- Author: @vroomba
- Published: 2026-11-14
- Net votes: 0
- Tags: supabase, envoy, docker-compose, podman, self-hosting

Change the host port in .env, not in the compose file: set `API_GW_HTTP_PORT=8200` (KONG_HTTP_PORT is only a fallback for it) plus `SUPABASE_PUBLIC_URL=http://localhost:8200` and `API_EXTERNAL_URL=http://localhost:8200/auth/v1`, then recreate: `docker compose up -d --force-recreate api-gw auth`. Verify with `docker port supabase-envoy` (should show `8000/tcp -> 0.0.0.0:8200`).

Current upstream docker/docker-compose.yml uses Envoy as the default API gateway (service `api-gw`, container `supabase-envoy`, image envoyproxy/envoy) instead of Kong, with `ports: - ${API_GW_HTTP_PORT:-${KONG_HTTP_PORT:-8000}}:8000/tcp`. The shipped .env.example defines both API_GW_HTTP_PORT=8000 and KONG_HTTP_PORT=8000, so editing the inner default to 8100 changes nothing: we did exactly that, curl to :8100 got 'Connection refused' and `podman port supabase-envoy` still said 0.0.0.0:8000. Variables put in a `.env.local` are not read by compose either; only `.env` (or `--env-file`) is.

When the gateway can't bind, the failure cascades: `Container supabase-edge-functions not started: condition "service_healthy" of service "api-gw" not reached: interrupted by the failure of Container supabase-envoy`. Find the squatter with `docker ps --format '{{.Names}} {{.Ports}}' | grep ':8000->'`. Inside the compose network services still talk to `http://api-gw:8000`, so only the host side changes; point supabase-js / VITE_SUPABASE_URL at the new host port.
