Connect a Production Database
Interactive web products usually need a production database before they can be published. Your published product runs on GetLaunch's servers, so a local database such as localhost, 127.0.0.1, or a file-based SQLite database will not be reachable after deployment.
Use a hosted Postgres database such as Neon, Supabase, RDS, or another provider, then add its connection string to your production environment as DATABASE_URL. For Supabase, Getlaunch can fill it for you.
What to Add
Most generated apps expect this environment variable:
DATABASE_URL=postgresql://user:password@host:5432/database?sslmode=require
Use the connection string your provider gives for apps: the pooled one for Neon, the Session pooler for Supabase. Do not paste a local development URL.
If your app uses Supabase client features, it may also need:
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
Only add the keys your generated product actually uses.
Neon
- Create or open a project in Neon.
- Click Connect.
- Choose the database and role your app should use.
- Turn on Connection pooling and copy that connection string. Its host contains
-pooler. - In Getlaunch, open the workspace production environment review.
- Paste the value into
DATABASE_URL. - Publish the workspace.
Use the pooled string, especially for a pay-as-you-go web app: several copies of your app can serve visitors at once, each with its own database connections, and the direct string runs out of connections under load. The pooled string works for your app and for the table updates that publishing runs.
Make sure the copied URL starts with postgresql:// or postgres:// and points to a hosted Neon hostname.
Supabase
Connect Supabase (recommended)
- In Getlaunch, open the workspace production environment review.
- Under
DATABASE_URL, choose Connect Supabase and approve Getlaunch in the Supabase window. - Choose one of these:
- New project: pick a name and region, then choose Create database. Getlaunch creates the project and its password. When the database is ready, usually in 1–2 minutes,
DATABASE_URLfills in. - Existing project: pick the project, type its database password, then choose Use this database. Getlaunch checks the password before filling
DATABASE_URL. If you forgot it, reset it in Supabase under Project Settings → Database.
- New project: pick a name and region, then choose Create database. Getlaunch creates the project and its password. When the database is ready, usually in 1–2 minutes,
- Publish the workspace.
Getlaunch always fills the Session pooler connection string, which your published app can reach. Access to your Supabase account lasts only for this setup. Next time, you connect again.
Paste it yourself
- Open your project in Supabase, then choose Connect.
- Copy the Session pooler connection string. Do not use the direct connection (
db.<project>.supabase.co): it only works over IPv6, so the published app cannot reach it. Do not use the Transaction pooler (port 6543) either: your app's database client relies on prepared statements, which that pooler doesn't keep, so queries can return wrong results. - Replace the password placeholder with your actual database password.
- In Getlaunch, open the workspace production environment review.
- Paste the value into
DATABASE_URL. - Publish the workspace.
For apps that use Supabase Auth, Storage, or client APIs, also add the Supabase URL and anon key if your generated app asks for them.
Other Postgres Providers
Use any hosted Postgres provider that gives you a public connection string. The value should include:
- Username
- Password
- Hostname
- Port
- Database name
- SSL requirement when your provider needs it
Do not use a private-only database unless Getlaunch can reach it from the public internet.
Common Errors
localhost or 127.0.0.1
The deployed container cannot reach your laptop or preview sandbox. Use a hosted database URL.
Wrong password
Copy the connection string again and replace any password placeholder.
SSL required
Add your provider's SSL option, often ?sslmode=require, when the provider requires encrypted connections.
Database does not exist
Check that the database name in the URL matches the database created by your provider.
Migrations did not run
Some generated apps create tables during build or startup, while others require a migration command. Check the workspace output or deployment logs for migration errors.

