Self Hosting
Database
We use Supabase as our database.
If you need a random string, you can use
openssl rand -base64 15to generate 15 real entropy characters.
Hardware
Bare metal
| Specs | Minimum | Recommended |
|---|---|---|
| Cores | 2 | 4 |
| RAM | 8Gb | 16Gb |
| Disk | 25Gb | 50Gb |
Cloud providers
| Cloud Provider | Minimum | Recommended |
|---|---|---|
| Azure | Standard B2ms | Standard B4ms |
| AWS | t3.small | t3.xlarge |
| GCP | n4-standard-2 | n4-standard-4 |
Requirements
Docker
Installation
# Get the code
git clone --depth 1 https://github.com/supabase/supabase
# Go to the docker folder
cd supabase/docker
# Copy the fake env vars
cp .env.example .env
# Pull the latest images
docker compose pull
# Start the services (in detached mode)
docker compose up -dAfter all the services have started you can see them running in the background:
docker compose psAll of the services should have a status running (healthy).
If you see a status like created but not running, try starting that service manually with docker compose start <service-name>.
You can go to your DB admin going to http://<your-ip>:8000.
You probably need to open the firewall on that port.
In this page you will be prompted for a username and password. By default, the credentials are:
- Username: supabase
- Password: this_password_is_insecure_and_should_be_updated
You should change these credentials as soon as possible in ./docker/.env file:
- ANON_KEY - replace with an anon key
- SERVICE_ROLE_KEY - replace with a service key.
Configuring an email server
You will need to use a production-ready SMTP server for sending emails. You can configure the SMTP server by updating the following environment variables in ./docker/.env file:
SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASS=
SMTP_SENDER_NAME=We recommend using AWS SES. It’s extremely cheap and reliable. Restart all services to pick up the new configuration.
If you do not need email you can set ENABLE_EMAIL_AUTOCONFIRM=true and forget about the others.
Edgen Base
- You’ll first need the
.envfile, ask the team! - Clone the repo base
- Docker self hosting supabase, how to [Self Hosting Database](# Database)
- Change in
.envNEXT_PUBLIC_SUPABASE_URL=http://kong:8000 - Go to
supabase\dockerin the superbase repo and copy theANON_KEYin the.envfile and paste it in this repo.envNEXT_PUBLIC_SUPABASE_ANON_KEY - Build docker imagen
docker build -t base . - Run imagen and add to superbase network
docker run -p 3000:3000 --network supabase_default baseor rundocker-compose up -d - open http://localhost:3000/ on the browser or the one returned in your case
- you can enter superbase here http://localhost:8000/