Deploy

Databases

Create a PostgreSQL or MySQL database in one click and connect your services to it.

Harblet runs PostgreSQL and MySQL databases next to your services. Only services in the same project can connect to them.

TypeVersions
PostgreSQL18
MySQL9.7, 8.4

Create a database

Open the project

Open a project and click New service → Database.

Fill in the form

Type
required
PostgreSQL or MySQL.
Name
required
Up to 64 characters. Defaults to the type.
Version
required
The major version. Deploying the database updates it to the newest patch release of this version.
Username
required
Defaults to postgres or root. Up to 32 lowercase letters, digits and underscores, starting with a letter. PostgreSQL usernames can't start with pg_. Can't be changed later.
Database name
required
Defaults to app. Up to 63 characters, the same ones as the username. Names the database reserves, such as template1 or mysql, aren't allowed. Can't be changed later.

Create it

Click Create database. Harblet generates a password and starts the database right away.

Connect to it

The database's Overview tab shows its connection details under Connection:

FieldExample
Hostpostgresql-x7k2
Port5432 for PostgreSQL, 3306 for MySQL
Databaseapp
Usernamepostgres
PasswordGenerated, hidden until you click the eye button
Connection URLpostgresql://postgres:<password>@postgresql-x7k2:5432/app

Copy the Connection URL into an environment variable of the service that uses it, such as DATABASE_URL, and deploy that service.

  • Only services in the same project can connect. Other projects and the internet can't reach the database.
  • The host never changes, also when you rename the database.
  • Every member of your Harblet can see the password.
For MySQL with a username other than root, Harblet sets a random root password that it doesn't show. Use the username from the connection details.

Where the data lives

A database stores its data on the disk of the server it runs on. It stays on that server: if the server fails, the database waits for it to come back, while other services move to another server.

Set up backups so you don't lose data when a disk fails.

Update to a new patch release

Click Deploy on the database. Harblet restarts the database briefly and pulls the newest patch release of its version, for example the newest PostgreSQL 18.x.

If the new release fails to start, Harblet automatically deploys the version that ran before. The deployment list shows it as Rollback.

Harblet doesn't upgrade databases to a new major version, and the version of a database can't be changed.

What you can change

Under Settings, you can rename the database. Its version, username, database name and password stay as they were created.

Databases have no environment variables, domains or deploy hooks.

Delete a database

Open the database's Settings tab and click Delete service. Harblet deletes the database with all its data.

This can't be undone. Backups stay at their destination, but Harblet no longer lists them.
Copyright © 2026 Harblet