Databases

Databases

A managed PostgreSQL or Valkey instance that lives inside your project, backed up on a schedule, and reachable from your apps by name.

View .md Reviewed against 2026.9.10
On this page

What it is

A database in klickops is a managed instance you create from the Databases page of a project. klickops runs it, watches it, takes the backups, and patches it once you turn on automatic updates. You get a connection string and a console. Nothing about it lives outside the project, so deleting the project deletes the database with it.

Two engines are available today. PostgreSQL is the full-featured one, with replicas, connection pooling, extensions, and point-in-time restore. Valkey is a single instance for caches, sessions, and queues, either a cache that keeps nothing on disk or a data store persisted to a volume, with no replication and no backups by design.

When you'd use it

  • Your app needs a database and you would rather not operate one.
  • You want connection details injected into the app instead of pasted into a secret by hand.
  • You are moving off a hosted provider and want the data where your project is.
Not this

A database belongs to one project. Apps in another project cannot reach it, and no firewall rule opens that path, so put the apps that use it in the same project. A database cannot be moved between projects after it is created.

Create a database

  1. Open your project, go to Databases, then Add database.
  2. Pick the engine. Choosing PostgreSQL fills in the defaults below; choosing Valkey switches to the cache defaults and drops the backup step.
  3. Set the size. Storage is a slider with your plan's ceiling drawn on it. CPU and memory follow the size you pick and can change later without data loss.
  4. Decide how many instances. PostgreSQL starts at three, one primary and two replicas, which is what lets it survive losing a node. Drop it to one for a development database, and the cost drops with it.
  5. Choose a backup destination. With the default Production preset, daily backups are on and the wizard will not finish without a bucket to write them to; Staging and Dev start without backups.
  6. Create. The instance is usually ready in under two minutes, and the page shows the phase while it comes up.

The Databases list of a project, with the available engines below it.The Databases list of a project, with the available engines below it.
The Databases list of a project, with the available engines below it.

Connect an app to it

Open the database, click Connect to app, and choose the app. klickops writes the host, port, database name, user, and password into the app as a binding, so you never paste credentials by hand.

The credentials sit on that tab if you need them locally, and reading them needs editor access: they include the live password, so a viewer sees the rest of the database but not its connection details. The password stays masked until you reveal it, and the API never returns it in a list response.

# one query through klickops, no local postgres client needed
klops db query orders-db --project shop -- "select count(*) from orders"

Operating it day to day

Every database opens on Overview, and the tab strip is the whole surface. Valkey shows a shorter one: it has a command console instead of a SQL editor, and no backups tab.

TabWhat lives there
ConnectCredentials, app bindings, connection pooler
QueryRun SQL against the instance, one statement at a time. Valkey shows a command console
BrowseTables and rows: create or drop tables, and edit, add or delete rows in tables with a primary key
Data & backupsSchedule, restore points, dump import and export
StorageGrow the volume. Storage grows and never shrinks
UpdatesMinor patches and major version upgrades
MetricsConnections, cache hit rate, disk, CPU
LogsInstance logs, live and historical
AdvancedTuning: server parameters picked from a workload profile. Extensions, TLS and client access rules are set with klops databases or the API

Settings reference

SettingDefaultWhat it does
VersionPostgreSQL 16, Valkey 8.1Pre-picked so the name is the only field you must fill in. Minor patches install on their own once you turn on automatic updates on the Updates tab; a major version change is an explicit upgrade with a plan you approve first.
Storage10 GB for PostgreSQLVolume size. Grows online, never shrinks. Your plan's ceiling is drawn on the slider. A Valkey cache has no disk; a Valkey data store starts at 1 GB.
Instances3 for PostgreSQL, 1 for ValkeyThree nodes is the default: one primary, two replicas, automatic failover. A single instance costs a third as much and cannot survive a node failure.
Connection pooleroffPuts PgBouncer in front of the instance. Turn it on when you have more clients than connections.
Backupson, daily at 02:00 UTC, 30 daysPostgreSQL only, on with the Production preset, and it needs a destination bucket before it can run. Set up later from Data & backups, retention starts at 7 days. Write-ahead logs are kept too, so you can restore to any second inside the window. Valkey has no backups at all.
ExtensionsnonePostgreSQL extensions such as postgis or pgvector, installed with klops databases extensions install. Only the few that preload a library, such as pg_stat_statements, restart the instance.
Parametersengine defaultsTuned from a workload profile on the Advanced tab. A few, such as shared_buffers and max_connections, restart the instance, and the button says Apply & restart before you commit.
TLSon, self-signedEvery instance serves TLS with its own certificate, but clients are not forced to use it. Bring your own certificates with klops databases tls.
Update policymanualWhether klickops installs minor patches for you, or only tells you one is available.

Limits and gotchas

  • Storage only grows. There is no shrink. Size for a year, not for a decade.
  • Valkey has no backups. A cache keeps nothing on disk, so treat it as disposable. A data store survives restarts on its own volume, but nothing copies it anywhere else.
  • PostgreSQL backups need somewhere to go. Nothing is written until you point them at a bucket.
  • Major upgrades are one way. The plan shows what changes, and the upgrade refuses to start without a successful backup from the last 24 hours. There is no downgrade afterwards.
  • The instance is not reachable from the internet. Apps in the same project reach it by name; nothing outside the project can.
Careful

Deleting a database deletes its volume and its backups. The dialog asks you to type the database name because there is nothing to undo afterwards. Export a dump first if you are unsure.

  • Apps is what usually connects to this, from its Configuration tab.
  • Domains if you are exposing something that talks to it.