The PostgreSQL service gives you a database of your own on PostgreSQL 16 that is reachable over the internet. You manage it in the same panel as your game servers, and your application, bot or plugin connects to it directly.

Order PostgreSQL

Open the Apps page, pick the database card and click Configure service. In the order wizard you also find PostgreSQL in the Apps category. In the Configuration step you set two things:

  • Name of the initial database: 3 to 48 characters, lowercase letters, digits and underscores only.
  • Memory (RAM): 1 or 2 GB.

The wizard does not ask for a username or password. Both are created during setup, and the user is called app.

Find your credentials

Open the service under My servers and click Service. Under Credentials you see the host, port, user and password. The password is hidden until you click Show.

Your service has its own port assigned by the panel. The PostgreSQL default port 5432 will not connect, so always use the port shown in the panel.

Further down the page, under Endpoint, you find the Ready-made connection strings for PHP (PDO), Node.js, Python and Java (JDBC). The Node.js and Python lines contain the password, so they are hidden. The eye icon shows them, and Copy takes the whole line.

Connect

With the psql command line tool the connection looks like this. Fill in the host, port and database name from the panel:

psql "postgresql://app@HOST:PORT/DATABASE"

psql then asks for the password. Graphical tools such as DBeaver or pgAdmin need the same four values: host, port, user and password.

In your code, take the matching line from the connection strings and store it as an environment variable, for example DATABASE_URL. For Node.js with the pg package:

const { Client } = require('pg');
const client = new Client({ connectionString: process.env.DATABASE_URL });
await client.connect();

The Python line is meant for SQLAlchemy and starts with postgresql+psycopg2://. If you connect with psycopg2 directly, remove +psycopg2.

Create more databases

Under Databases, click Manage databases. The list shows every database with its size, and the initial database carries the Default badge. This is how you work with the list:

  • To create a database, enter a name at the bottom and click Create. Letters, digits and underscores are allowed, up to 48 characters. The app user gets full rights on it.
  • Copy URL gives you the address of a database without the password.
  • Delete database removes a database with all its tables. The default database cannot be deleted.

Change the password

Under Credentials, click Regenerate password and confirm. The new password works immediately and existing connections are closed. Then enter it in every application that uses the database.

Back up your data

Under Export, Go to backups takes you to the backups. A backup contains all data of the service, so every database on it. Create one before bigger changes.

To keep a copy on your own computer, use pg_dump:

pg_dump "postgresql://app@HOST:PORT/DATABASE" > backup.sql

Common errors

  • password authentication failed for user "app": The password is wrong. If you regenerated it, your application is probably still using the old one.
  • No response or a timeout: Check that you use the port from the panel and that the service is running. You see the status at the top of the server page.
  • database "…" does not exist: The database name is misspelled. The valid names are listed under Manage databases.
  • server does not support SSL, but SSL was required: Your program requires an encrypted connection that the service does not offer. Remove sslmode=require from the connection line or set the SSL mode in your program to prefer.
  • PostgreSQL management is currently unavailable: The panel cannot load the database list right now. Your credentials still work, so you can connect directly with psql or another program.

Lines such as "invalid length of startup packet" in the console appear when something contacts the port without speaking PostgreSQL, such as a reachability check. They are harmless.