Back to Blog
Tutorial5 min read2026-05-01

How to Host PostgreSQL for Free on PandaStack

PandaStack offers managed PostgreSQL as part of its platform. Here's how to spin up a free database, connect to it, and manage it from the dashboard.

# How to Host PostgreSQL for Free on PandaStack

Running your own PostgreSQL server means dealing with backups, updates, connection limits, and security patches. PandaStack's managed PostgreSQL removes all of that overhead — spin up a database in under a minute and connect to it from any application.

What PandaStack's Managed PostgreSQL Includes

  • Automatic backups
  • Monitoring and alerting
  • Connection pooling
  • SSL-encrypted connections
  • Simple dashboard management

PandaStack also supports MySQL, Redis, and MongoDB if your stack requires them.

Step 1: Create a PostgreSQL Database

  1. 1Log in to [dashboard.pandastack.io](https://dashboard.pandastack.io)
  2. 2Click Databases in the left sidebar
  3. 3Click New Database
  4. 4Select PostgreSQL
  5. 5Choose your configuration and click Create

Your database is ready in about 60 seconds.

Step 2: Get Your Connection Details

After creation, click your database to see the connection details panel:

Host:     db.pandastack.io
Port:     5432
Database: your_database_name
Username: your_username
Password: ****
SSL:      required

The dashboard also shows you the full connection string:

postgresql://username:password@db.pandastack.io:5432/your_database_name?sslmode=require

Step 3: Connect via psql

psql "postgresql://username:password@db.pandastack.io:5432/your_database_name?sslmode=require"

Or with individual parameters:

PGPASSWORD=yourpassword psql -h db.pandastack.io -U username -d your_database_name -p 5432

Step 4: Connect from Your Application

Node.js (pg or postgres.js)

import postgres from 'postgres'

const sql = postgres(process.env.DATABASE_URL, {
  ssl: 'require',
  max: 10, // connection pool size
})

const result = await sql`SELECT NOW()`
console.log(result[0].now)

Python (psycopg2 or asyncpg)

import psycopg2

conn = psycopg2.connect(os.environ['DATABASE_URL'], sslmode='require')

Django

import dj_database_url

DATABASES = {
    'default': dj_database_url.config(default=os.environ['DATABASE_URL'])
}

Step 5: Set DATABASE_URL as an Environment Variable

In your PandaStack deployment settings, add:

DATABASE_URL=postgresql://username:password@db.pandastack.io:5432/your_database_name?sslmode=require

This keeps your credentials out of your codebase and in PandaStack's encrypted environment variable store.

Step 6: Monitor Your Database

From the database dashboard you can:

  • View connection count and query performance
  • Set up alerts for high CPU or connection limits (email, Slack, or webhook)
  • View backup history and trigger manual backups
  • Check storage usage

Step 7: Connect Multiple Apps to One Database

A single managed PostgreSQL database can serve multiple applications. Each app connects using the same connection string. Use separate schemas or databases within the same PostgreSQL instance to keep data isolated.

Other Supported Database Types

PandaStack supports four database types from the same dashboard:

DatabaseUse Case
PostgreSQLGeneral-purpose relational database
MySQLWeb apps, WordPress, legacy PHP
RedisCaching, sessions, queues
MongoDBDocument storage, unstructured data

Create each from DatabasesNew Database → select type.

Full documentation: [docs.pandastack.io](https://docs.pandastack.io).

Ready to deploy?

Start free on PandaStack — no credit card required.

Start free on PandaStack

More in Tutorial

Browse all Tutorial articles →

See also