Docs·UnderPeaks

Connecting Your Database · PostgreSQL

PostgreSQL

Requirements

  • PostgreSQL 14 or higher

Create a database and user

CREATE DATABASE underpeaks;
CREATE USER underpeaks WITH PASSWORD 'your-password';
GRANT ALL PRIVILEGES ON DATABASE underpeaks TO underpeaks;

Set environment variables

NEXT_PUBLIC_DB_TYPE=postgres
NEXT_DB_POSTGRES_HOST=localhost
NEXT_DB_POSTGRES_PORT=5432
NEXT_DB_POSTGRES_USER=underpeaks
NEXT_DB_POSTGRES_PASSWORD=your-password
NEXT_DB_POSTGRES_DATABASE=underpeaks

Notes

  • Underpeaks uses a connection pool internally. Do not use a single Client instance.
  • The installer sets timezone=UTC on all sessions to prevent offset bugs.
  • If you are using a managed provider (Neon, Railway, Supabase Postgres direct), use the connection pooler host/port where available.