Running on Galaxy Legacy? Visit the legacy docs.
Galaxy

PostgreSQL

Reliable relational database with strict structure. Perfect for production applications and complex data relationships.

PostgreSQL on Galaxy

Galaxy gives you a fully managed PostgreSQL database, provisioned in minutes and connected to your app with a single environment variable.


Create a PostgreSQL Database

Open Your Dashboard

Go to your Galaxy dashboard and click Databases in the sidebar.

Start Database Creation

Click Create Database and select PostgreSQL as your database type.

Configure Your Instance

Choose your PostgreSQL version and instance size. Pick the region closest to your app for best performance.

Create and Wait

Click Create Database & Start Billing. Galaxy provisions your database in a few minutes. You'll see "Running" when it's ready.

Same Region = Best Performance

Deploy your database in the same region as your app. This minimizes latency and keeps your data transfer free.


Connect to Your App

Click your database in the dashboard to see the connection string. Copy it and add it as an environment variable in your app's settings.

The exact variable name depends on your framework:

  • Node.js apps: Often DATABASE_URL, DB_HOST, or separate DB_USER, DB_PASSWORD, DB_DATABASE variables
  • Python apps: Typically DATABASE_URL
  • AdonisJS apps: Usually DB_CONNECTION, DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE

Keep Your Connection String Secure

Never hardcode your connection string in your code. Always use environment variables so it stays out of version control.


Security

Your database is protected with username and password authentication. All connections from your Galaxy apps stay within Galaxy's private network and never traverse the public internet.


Features

Automatic Backups: Daily backups included with all plans. Your data is protected without any extra configuration.

Zero Transfer Fees: Data moving between your app and database is free. No surprise charges for internal traffic.


Common Questions


What's Next?