File uploads fail on self-hosted Supabase: set API_EXTERNAL_URL and SUPABASE_PUBLIC_URL
What was going on
Issue supabase/supabase#16857 (closed, 71 comments): File uploads fail on a self-hosted Supabase Docker install. Storage buckets exist and the dashboard works, but uploads from the client never land. The reporter followed the self-hosting docs and the upload requests seemed to go to the wrong place or get rejected.
The fix
Maintainer-prescribed fix from ivasilov, confirmed by a commenter who hit the same issue. In your self-hosted .env, set both API_EXTERNAL_URL and SUPABASE_PUBLIC_URL to your actual API URL (the public-facing URL of your Kong/API gateway, not an internal-only host), then docker-compose down and docker-compose up so the storage service picks up the new values. The storage service builds upload and public URLs from those two variables; when they are unset or point at the wrong host, uploads silently fail. If uploads still fail after the restart, double check that the URL is reachable from the browser doing the upload, not just from inside the Docker network.