
This is a demo of Supabase for Zeabur Self-hosted. You can use this template to deploy a Supabase instance on Zeabur.
This Supabase instance includes Kong (API Gateway), Studio (Supabase Studio), PostgreSQL (Database), Meta (Postgres Meta), REST (PostgREST), Auth (GoTrue), Supavisor (Connection Pooler), Realtime (Database Change Subscriptions), Storage (Storage API), MinIO (Object Storage), ImgProxy (Image Processing), and Functions (Edge Functions).
For detailed architecture information, visit the official Supabase architecture documentation.
Services Not Included Due to Platform Limitations:
Note: Without Analytics, the Logs feature in Supabase Studio will not be available. All other Studio features (Database, Auth, Storage management, etc.) will work normally.
If you need additional Supabase services, feel free to implement them according to the upstream docker-compose.yaml file and submit your changes to our Discord server. This applies to our Contribution Reward Program.
After deployment, your Supabase Studio dashboard will be available at your configured domain.
Finding Your Credentials:
DASHBOARD_USERNAME variable)The following keys are exposed in the Kong service environment variables:
| Key | Location | Description |
|---|---|---|
JWT_SECRET | Kong service | Secret for signing JWT tokens |
ANON_KEY | Kong service | Public API key for anonymous access |
SERVICE_ROLE_KEY | Kong service | Admin API key with full access |
⚠️ CRITICAL: The default keys are for demo purposes only. You MUST generate new keys before production use.
How to Generate Secure Keys:
JWT_SECRET:
anon key → use as ANON_KEYservice_role key (shown as SERVICE_KEY on the website) → use as SERVICE_ROLE_KEYWhile we provided you with some example secrets for getting started, you should NEVER deploy your Supabase setup using the defaults we have provided. Follow all of the steps in this section to ensure you have a secure setup, and then restart all services to pick up the changes.
Add the following environment variables to the auth service:
GOTRUE_EXTERNAL_GOOGLE_ENABLED=trueGOTRUE_EXTERNAL_GOOGLE_CLIENT_ID=xxxxxxxxGOTRUE_EXTERNAL_GOOGLE_SECRET=yyyyyyyyGOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=https://supabase.zeabur.app/auth/v1/callbackUpdate supabase.zeabur.app to your public domain, for example: supabase.example.com.
You can find the client ID and secret in the Google Cloud Console.
Then, restart your auth service.
Add the following environment variables to the auth service:
GOTRUE_EXTERNAL_APPLE_ENABLED=trueGOTRUE_EXTERNAL_APPLE_CLIENT_ID=xxxxxxxxGOTRUE_EXTERNAL_APPLE_SECRET=yyyyyyyyGOTRUE_EXTERNAL_APPLE_REDIRECT_URI=https://supabase.zeabur.app/auth/v1/callbackUpdate supabase.zeabur.app to your public domain, for example: supabase.example.com.
You can find the client ID and secret in the Apple Developer Console.
Then, restart your auth service.
To enable email functionality in Supabase (user verification, password reset, etc.), configure SMTP settings using Resend as the email service provider.
Domain Verification:
mail.yourdomain.com) in ResendSender Email Setup:
noreply@mail.yourdomain.comAdd the following environment variables to the auth service:
GOTRUE_SMTP_HOST=smtp.resend.com - SMTP server hostGOTRUE_SMTP_PORT=587 - Use STARTTLS portGOTRUE_SMTP_USER=resend (or leave blank) - Resend doesn't validate username, only API keyGOTRUE_SMTP_PASS=re_xxx - Your Resend API KeyGOTRUE_SMTP_ADMIN_EMAIL=noreply@mail.yourdomain.com - Admin sender emailGOTRUE_SMTP_SENDER_NAME=Your App Name - Display name for emailsGOTRUE_SITE_URL=https://yourdomain.zeabur.app - Determines the domain for verification links in emailsauth service to apply changesManual Testing:
curl -X POST "https://yourdomain.zeabur.app/auth/v1/signup" \
-H "Content-Type: application/json" \
-H "apikey: YOUR_ANON_KEY" \
-d '{
"email": "test@example.com",
"password": "yourpassword"
}'
Expected Results:
GOTRUE_SITE_URL matches your actual deployed domainFor advanced email customization, you can configure:
Add these environment variables to the auth service for advanced features:
Custom Access Token Hook:
GOTRUE_HOOK_CUSTOM_ACCESS_TOKEN_ENABLED=trueGOTRUE_HOOK_CUSTOM_ACCESS_TOKEN_URI=pg-functions://postgres/public/custom_access_token_hookGOTRUE_HOOK_CUSTOM_ACCESS_TOKEN_SECRETS=<your-base64-secret>MFA Verification Hook:
GOTRUE_HOOK_MFA_VERIFICATION_ATTEMPT_ENABLED=trueGOTRUE_HOOK_MFA_VERIFICATION_ATTEMPT_URI=pg-functions://postgres/public/mfa_verification_attemptPassword Verification Hook:
GOTRUE_HOOK_PASSWORD_VERIFICATION_ATTEMPT_ENABLED=trueGOTRUE_HOOK_PASSWORD_VERIFICATION_ATTEMPT_URI=pg-functions://postgres/public/password_verification_attemptCustom SMS Hook:
GOTRUE_HOOK_SEND_SMS_ENABLED=trueGOTRUE_HOOK_SEND_SMS_URI=pg-functions://postgres/public/custom_sms_hookGOTRUE_HOOK_SEND_SMS_SECRETS=v1,whsec_<your-secret>Custom Email Hook:
GOTRUE_HOOK_SEND_EMAIL_ENABLED=trueGOTRUE_HOOK_SEND_EMAIL_URI=http://host.docker.internal:54321/functions/v1/email_senderGOTRUE_HOOK_SEND_EMAIL_SECRETS=v1,whsec_<your-secret>Other Options:
GOTRUE_EXTERNAL_SKIP_NONCE_CHECK=true (for mobile Google Sign In)GOTRUE_MAILER_SECURE_EMAIL_CHANGE_ENABLED=trueGOTRUE_SMTP_MAX_FREQUENCY=1sStudio SQL Assistant:
Add to studio service:
OPENAI_API_KEY=your-openai-api-key