Deploy Supabase Self-Hosted
Full Supabase stack in one click: database, auth, storage, Studio
Just deployed
/var/lib/postgresql/data
Realtime
Just deployed
Just deployed
Just deployed
Just deployed
Just deployed
Imgproxy
Just deployed
Just deployed
Just deployed
Just deployed
Just deployed
/app/snippets
StorageBucket
Bucket
Just deployed
Deploy and Host Supabase Self-Hosted on Railway
Supabase Self-Hosted gives you a complete, open-source backend in one click on Railway: Postgres for your database, Auth for sign-in, Storage for files, Studio for managing it all, plus Realtime, REST, Edge Functions, and a connection pooler. You get the building blocks of a modern app without running servers yourself, and all services talk to each other over Railway's private network, with only the Gateway exposed to the internet.
About Hosting Supabase Self-Hosted
Hosting Supabase yourself means running several services together: a Postgres database, an authentication service, a file storage service, a dashboard, and the APIs that connect them. This template wires those services together for you, with passwords and secrets generated at deploy time, a single public entry point, and a Railway Bucket for file storage, so you can focus on building your app instead of configuring infrastructure.
Honest verification status: This template was verified locally on 2026-11-03, and a live Railway deploy test has NOT happened yet. The following items are still untested on Railway and should be checked on first deploy: storage S3 endpoint format, gateway PORT override behavior, inter-service private-domain ports, imgproxy fetch path, supavisor pooler port 6543, functions main worker boot, and first-day cost.
Common Use Cases
- Build a web or mobile app backend with Postgres, user authentication, and file storage in one place.
- Prototype a full-stack app quickly, then keep the same backend as it grows.
- Run a self-hosted alternative to a managed backend, with full control over your data and services.
Dependencies for Supabase Self-Hosted Hosting
- A Railway account, plus the included Postgres, Auth, REST, Realtime, Storage, Imgproxy, Meta, Studio, Functions, Supavisor, and Gateway services.
- A Railway Bucket for file storage, created automatically with this template.
- No other external service is required to get started; email and other providers are optional and can be added later.
Implementation Details
The Gateway is the only public service. All other services use Railway private domains, so database and internal API traffic does not leave the private network. Secrets such as the JWT secret and database passwords are generated at deploy time, and the Studio dashboard is reached through the Gateway. Note: Railway allows one volume per service, so Studio carries the /app/snippets volume in this template; the /app/edge-functions folder is not persisted as a separate volume in this version, and function code lives in the Functions image.
Why Deploy Supabase Self-Hosted on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Supabase Self-Hosted on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Realtime
supabase/realtime:v2.143.3DNS_NODES
List of DNS nodes for Realtime clustering, left empty.
ANON_KEY_ASYMMETRIC
Anonymous key in asymmetric format, to be filled by the user.
SUPABASE_SECRET_KEY
Secret key, to be filled by the user.
SUPABASE_PUBLISHABLE_KEY
Publishable key, to be filled by the user.
SERVICE_ROLE_KEY_ASYMMETRIC
Service role key in asymmetric format, to be filled by the user.
Imgproxy
darthsim/imgproxy:v3.31.4GOTRUE_SMTP_HOST
SMTP host for Auth emails, to be filled by the user.
GOTRUE_SMTP_PORT
SMTP port for Auth emails, to be filled by the user.
GOTRUE_URI_ALLOW_LIST
Allowed redirect URIs for Auth, to be filled by the user.
GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI
Redirect URI for Google sign-in, to be filled by the user.
OPENAI_API_KEY
OpenAI API key for Studio, to be filled by the user.
SUPABASE_SECRET_KEY
Secret key, to be filled by the user.
SUPABASE_PUBLISHABLE_KEY
Publishable key, to be filled by the user.
StorageBucket
Bucket
