Docker is the easiest way to get started with self-hosted Supabase.
You need the following installed in your system:
Checkout the docker directory in the Supabase repo:
.env and populate the values.
In particular, these are required:
POSTGRES_PASSWORD: the password for the
JWT_SECRET: used by PostgREST and GoTrue, among others
SITE_URL: the base URL of your site
SMTP_*: mail server credentials
JWT_SECRET to generate a
service API keys using the JWT generator.
Replace the values in these files:
ANON_KEY- replace with an
SERVICE_KEY- replace with a
anon- replace with an
service_role- replace with a
You can now start Supabase:
Your database will be persisted in
volumes/db/data, and your storage objects in
Try out the examples in
supabase/examples to verify if it works correctly!
To keep the setup simple, we made some choices that may not be optimal for production:
- the database is in the same machine as the servers
- the storage uses the filesystem backend instead of S3
See the following guides to deploy Docker Compose setup using your preferred tool and platform: