
ZeaburSupabase is a popular open-source alternative to Firebase. It provides a suite of tools including a Postgres database, authentication, APIs, and file storage, making it a robust backend solution.
Zeabur simplifies the deployment of this complex stack. With Zeabur, you can launch a fully functional Supabase instance (including Kong Gateway, Authentication, and PostgreSQL) in one click without manual configuration.
In this tutorial, we will guide you through:
No Logs in UI: The "Logs" feature in Supabase Studio will not work (due to missing Vector service). You must check logs via the Zeabur dashboard for each service. No MCP: The AI Model Context Protocol server is not included in this template.
Zeabur offers a "one-click deployment" via its template marketplace.
Option 1: Create Supabase instance from Project page
Supabase.Unlike a standalone database, Supabase on Zeabur uses a Kong Gateway to manage access. You need to retrieve credentials to log in to the UI.
⚠️ WARNING: The template deploys with default API keys for demo purposes. You MUST generate new keys before production use, or anyone with knowledge of the default keys can access your database.
JWT_SECRET and use the tool to generate:
anon key.service_role key.JWT_SECRET: Your custom secret.ANON_KEY: Your new anon key.SERVICE_ROLE_KEY: Your new service_role key.To apply these security changes, you must restart the stack:
By default, Supabase cannot send emails (magic links, password resets). You need to configure an SMTP provider. We recommend Resend, but any SMTP provider works.
GOTRUE_SMTP_HOST: smtp.resend.com (or your provider)GOTRUE_SMTP_PORT: 587GOTRUE_SMTP_USER: resend (or your username)GOTRUE_SMTP_PASS: re_123... (Your API Key)GOTRUE_SMTP_ADMIN_EMAIL: noreply@yourdomain.comGOTRUE_SITE_URL: https://your-project-domain.zeabur.app (The link where users are redirected)To enable Google Login, add these variables to the Auth service:
GOTRUE_EXTERNAL_GOOGLE_ENABLED: trueGOTRUE_EXTERNAL_GOOGLE_CLIENT_ID: your-google-client-idGOTRUE_EXTERNAL_GOOGLE_SECRET: your-google-secretGOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI: https://your-project.zeabur.app/auth/v1/callbackNote: Ensure you update your-project.zeabur.app to your actual domain.
Once the service restarts, verify the configuration by manually triggering a signup via terminal:
curl -X POST "https://your-project.zeabur.app/auth/v1/signup" \
-H "Content-Type: application/json" \
-H "apikey: YOUR_ANON_KEY" \
-d '{
"email": "test@example.com",
"password": "yourpassword"
}'
Expected Results:
200 OK JSON response.test@example.com (check spam).GOTRUE_SITE_URL matches your actual deployed domain exactly.Crucial: Do not copy keys from the Supabase Studio dashboard, as it may display old default keys.
Best for: Connecting your Lovable project or standard web application.
To enable communication between your frontend application and your Supabase backend, you need to configure environment variables in your codebase.
Create or open your .env file in your project root.
Add the credentials found in the Prerequisite step:
VITE_SUPABASE_URL=[your-project-url]
VITE_SUPABASE_ANON_KEY=[your-anon-key]
Best for: Developers pushing local database changes to the production instance.
You can push your local database schema to Supabase using the connection string.
Get Connection String: Go to the PostgreSQL service panel (part of your Supabase stack) in your Zeabur dashboard.
Copy: Copy the PostgreSQL connection string.
Run Command: Execute the following command in your terminal (ensure you have the Supabase CLI installed):
supabase db push --db-url "[your-supabase-postgresql-connection-string]" --debug
When you deploy your application to Zeabur alongside Supabase, you must inject the credentials into the deployment environment.
VITE_SUPABASE_URL: Paste your Project URL.VITE_SUPABASE_ANON_KEY: Paste your anon public key.Hint: Please make sure the credentials file such as .env is listed in your .gitignore file to prevent leaking secrets.
Add these variables to the specific services to enable advanced features.
Add these to the Auth service variables to trigger Postgres functions on specific events:
GOTRUE_HOOK_CUSTOM_ACCESS_TOKEN_ENABLED=trueGOTRUE_HOOK_CUSTOM_ACCESS_TOKEN_URI=pg-functions://postgres/public/custom_access_token_hookGOTRUE_HOOK_MFA_VERIFICATION_ATTEMPT_ENABLED=trueGOTRUE_HOOK_MFA_VERIFICATION_ATTEMPT_URI=pg-functions://postgres/public/mfa_verification_attemptGOTRUE_HOOK_PASSWORD_VERIFICATION_ATTEMPT_ENABLED=trueGOTRUE_HOOK_PASSWORD_VERIFICATION_ATTEMPT_URI=pg-functions://postgres/public/password_verification_attemptEnable the AI SQL assistant in the dashboard by adding this to the Studio service variables:
OPENAI_API_KEY=your-openai-api-keyGOTRUE_EXTERNAL_SKIP_NONCE_CHECK=true (Useful for mobile Google Sign In)GOTRUE_MAILER_SECURE_EMAIL_CHANGE_ENABLED=true (Enforce email verification for email address changes)