Dedicated Database Servers

A dedicated database server runs PostgreSQL and nothing else. Instead of your database sharing a box with your app, it gets its own server, its own CPU and memory, and tuning built for a database host. One or more app servers then connect to it over the private network.

Creating a Database Server

Click Add server in the server bar at the top of the dashboard, the same form you use for an app server. Set the Type field to Database Server (PostgreSQL only) and fill in the rest:

The Add server form with Type set to Database Server (PostgreSQL only)

  • Name - a label for your reference, like db-prod-01.
  • Provider - DigitalOcean or Hetzner Cloud. Create the database server on the same provider as the app servers that will use it.
  • Region - a database server and the app servers that use it must share one private network, so where you place it matters. On DigitalOcean, they have to be in the same region. On Hetzner, they have to be in the same network zone - the European locations (Nuremberg, Falkenstein, Helsinki) share one zone, while Ashburn, Hillsboro, and Singapore are each their own. See Server Regions & Sizes.
  • Size - the CPU, RAM, and disk for the server. See Server Regions & Sizes for a comparison.
  • PostgreSQL Version - the default is PostgreSQL 18. Versions 17 and 16 are also available.

Provisioning takes about 5-10 minutes. Potions installs PostgreSQL from the official repository, rebuilds the cluster with data checksums, tunes it for a dedicated host, and locks the firewall so port 5432 is reachable only from your private network.

A database server counts as one of your servers against your plan's limit, the same as an app server. Because it runs no apps of its own, you'll want a plan that allows at least two servers so you can pair it with an app server. See Plans & Pricing.

Connecting an App

There are two ways to connect an app to a database server, and both require the app's server and the database server to be on the same private network - the same provider and region requirement described above.

A New App

When you create an app, the form includes a Database picker. It lists the database servers that share the app server's private network. Choose one, and the app's database is created on that server from the start instead of locally.

If the picker is empty, the app server isn't on the same private network as any database server. Create the database server on the same provider and region and it will appear.

An Existing App

If an app has outgrown sharing a server with its database, you can move the database onto a dedicated database server without recreating the app. Open the app's Database tab and find the Database location card. If an eligible database server exists on the same network, you'll see a Move to a dedicated database server form.

The Database location card on an app's Database tab with the move form

When you pick the target and start the move, Potions stops your app and shows a maintenance page while it copies the data to the database server, repoints the app at its new database, and starts it back up. Expect a few minutes of downtime, longer for larger databases.

The old local database stays on the app server until you remove it. Once you've confirmed the app works with its new database, you can delete the old copy to reclaim the disk space. This can't be undone.

Connection Details

The Database tab on the database server lists everything an app on the network needs to connect:

Field Value
Host The server's private IP
Port 5432
Admin User potions_admin
Reachable from Private network only

Potions wires these into your apps automatically when you attach them - you don't assemble a connection string by hand. The potions_admin superuser is what Potions uses to create each app's role and database on the server.

PostgreSQL listens only on localhost and the private IP, never the public internet, and the firewall allows port 5432 solely from the private network. Traffic between your app servers and your database server stays on that private network.

Backups

Once an app's database is on a database server, its scheduled and manual backups run there and the dumps are stored on that server, with the app's retention settings applied unchanged. The Backups tab lists them on that server instead of the app server.

If your app previously had its database on its app server, the backups taken before the move stay there. Restore those from an offsite copy or use a newer backup. See Automated Backups and Restoring a Backup.

Things to Know

  • Same network, same provider and region. An app can only use a database server that shares its app server's private network. Create both on the same provider and region.
  • Moves are one-way. A database moves onto a database server, not back to its app server.
  • You can't delete it while apps use it. Deleting a database server that apps still point at would strand their data, so Potions blocks it.
  • Cloud provider charges apply. A database server is a real VPS on your account, billed by your provider at their standard rates.