0
0
Supabasecloud~10 mins

Self-hosting Supabase - Step-by-Step Execution

Choose your learning style9 modes available
Process Flow - Self-hosting Supabase
Prepare Server Environment
Install Docker & Docker Compose
Download Supabase Docker Compose Files
Configure Environment Variables
Run Docker Compose to Start Services
Access Supabase Dashboard & APIs
Manage & Monitor Self-hosted Supabase
This flow shows the main steps to set up Supabase on your own server using Docker, from preparing the environment to running and accessing the services.
Execution Sample
Supabase
docker-compose up -d
# Starts Supabase services in background

# Access dashboard at http://localhost:54323

# Use Supabase APIs as usual
This code runs the Supabase services using Docker Compose and makes them available locally.
Process Table
StepActionCommand/DetailResult/State
1Prepare serverEnsure Linux server with Docker installedServer ready for Docker
2Install Docker ComposeInstall docker-compose toolDocker Compose ready
3Download Supabase filesgit clone --depth 1 https://github.com/supabase/self-hosting && cd self-hosting/dockerSupabase config files available
4Configure env varsEdit .env file with DB passwords, portsEnvironment configured
5Start servicesdocker-compose up -dSupabase containers running
6Check statusdocker psAll Supabase containers healthy
7Access dashboardOpen http://localhost:54323Supabase dashboard loads
8Use APIsCall Supabase REST or GraphQL endpointsAPIs respond correctly
9Monitor logsdocker-compose logs -fLive logs visible
10Stop servicesdocker-compose downSupabase services stopped
💡 All Supabase services are running and accessible locally after step 5; stopping services ends the session.
Status Tracker
VariableStartAfter Step 3After Step 5After Step 10
Server StateNo DockerDocker installedSupabase containers runningContainers stopped
Supabase FilesNoneConfig files downloadedFiles in use by containersFiles remain on disk
Services StatusNoneNoneRunningStopped
Key Moments - 3 Insights
Why do we need to configure environment variables before starting services?
Because environment variables set important settings like database passwords and ports. Without them, services may fail to start or be insecure. See execution_table step 4.
What does 'docker-compose up -d' do exactly?
It starts all Supabase services in the background as containers, making them ready to use. This is shown in execution_table step 5.
How can I check if all Supabase services are running correctly?
By running 'docker ps' to see running containers and 'docker-compose logs -f' to view live logs, as shown in steps 6 and 9.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the state of Supabase services after step 5?
AServices are stopped
BServices are running as containers
CServices are downloading files
DServices are being configured
💡 Hint
Check the 'Result/State' column for step 5 in execution_table
At which step do you configure database passwords and ports?
AStep 4
BStep 6
CStep 2
DStep 8
💡 Hint
Look at the 'Action' and 'Command/Detail' columns in execution_table
If you stop the services with 'docker-compose down', what happens to the Supabase containers?
AThey keep running
BThey restart automatically
CThey stop and are removed
DThey update to latest version
💡 Hint
Refer to step 10 in execution_table under 'Result/State'
Concept Snapshot
Self-hosting Supabase:
- Prepare server with Docker & Docker Compose
- Download Supabase config files
- Set environment variables (DB passwords, ports)
- Run 'docker-compose up -d' to start services
- Access dashboard and APIs locally
- Use 'docker-compose down' to stop services
Full Transcript
Self-hosting Supabase means running Supabase services on your own server instead of using the cloud. First, prepare a Linux server and install Docker and Docker Compose. Then download the Supabase configuration files from their repository. Next, configure environment variables like database passwords and ports in the .env file. After that, run 'docker-compose up -d' to start all Supabase services as Docker containers. You can check the status with 'docker ps' and view logs with 'docker-compose logs -f'. Access the Supabase dashboard via the local URL and use the APIs as usual. When done, stop the services with 'docker-compose down'. This setup gives you full control over your Supabase instance.