TurboPanel Docs
Using TurboPanel

Managed databases

A managed database is a database cluster TurboPanel provisions, secures and connects for you on your own servers: PostgreSQL, MySQL or MariaDB, in a container the platform owns, behind a shared listener that every consumer dials, with replication, promotion and backups handled from the app. You choose the engine, a version series and a server; the platform does the rest and hands you an endpoint and a first user. This chapter is written for the person creating and using one; the wiring underneath is in Managed database ingress.

The model

A managed database is a managed project — one project whose environment holds a cluster instead of a compose stack. It has three parts:

  • The cluster — one primary on the server you pick, plus any number of replicas. Engine containers are reachable only on the organization's private managed network; nothing publishes an engine port on the host.
  • The listener — a shared ProxySQL on every server that hosts a member or a consumer, on a port the organization sets (15432 for PostgreSQL, 13306 for the MySQL family by default). This is the only thing a client ever connects to. It routes each login to the primary or to read replicas, and it terminates client TLS with the organization's CA.
  • Logins and databases — the users and databases you create on the Data tab. Each login carries a connection role that decides where the listener sends it.

Two facts shape everything below:

  • The version series is chosen once. A cluster is created as PostgreSQL 18, MySQL 9.7 (the default) or 8.4, or MariaDB 11.8 (long-term support, the default) or 12.3, with a base-OS variant; the series never changes afterwards (managed_series_immutable). Only the variant may. MariaDB 12.3 can run on one server only for now: adding a replica, or converting a replica to a failover member, needs MariaDB 11.8 until failover for 12.x is supported. A 12.3 database that already exists keeps running as it is.
  • TLS between the listener and the engine is always on. The SSL mode you set is a client-facing policy — whether the listener refuses a plaintext client and what verification the connection string tells the driver to do — never a switch for engine encryption.

Before you begin

  • A connected server with Docker; the cluster's primary runs there. Every server whose apps use a managed database runs the database proxy, and on a Raspberry Pi 5 running Raspberry Pi OS (Debian 13, "trixie") the default 16 KiB kernel cannot run it; one command switches the Pi to the 4 KiB kernel — see Raspberry Pi, databases and memory limits.
  • For a failover replica: a second server in the same datacenter network as the primary. For a remote read replica: any server in the organization, with TurboFabric or a datacenter network path to the primary.
  • For a client on another server: that server enrolled in the organization (the listener is deployed to it when a service there binds the database).
  • Manage rights on the organization.

Create a cluster

Projects → New project, name it, choose Managed.

Pick the engine from the catalog. Only released engines are selectable; the card says so otherwise.

Choose the version series and the base-OS variant (Alpine, Debian, Oracle Linux 9 or UBI, per engine), and the server for the primary.

Create project. The root password is shown once — copy it now; the platform never shows it again (you can rotate it later).

The Overview shows the cluster provisioning, then Running. Provisioning polls only while it is in progress.

EngineCreatable series (tested)Variants
PostgreSQL18Alpine, Debian
MySQL9.7 (default), 8.4Debian, Oracle Linux 9
MariaDB11.8 (default, long-term support), 12.3 (one server only)Debian, UBI

Older series (PostgreSQL 17/16/15, MariaDB 11.4/10.11) are catalogued so an existing cluster can be named, not created.

Connect to it

The Connect tab is the one place to read the endpoint from; never dial an engine container directly.

Read the listener endpoint — host and port of the ProxySQL on the primary's server (or, for a service bound elsewhere, on that service's server).

Note the effective SSL policy and its DSN parameter (sslmode= for PostgreSQL, ssl-mode= for MySQL and MariaDB). For verify-ca or verify-full, download the Organization CA from the same tab and point your driver at it.

Use a login from the Data tab. Under the default partial scheme applied usernames carry a random suffix (app_x7…), so copy the applied name, not the short one you typed.

For a service in a compose project, do not paste any of this into variables: bind the database instead (Bindings on the compose project), and the connection details appear as locked variables under the binding's prefix, kept current by the platform. See Bindings. In a container, the PostgreSQL password is handed over only as a file (PGPASSWORD_FILE), never as PGPASSWORD; see PostgreSQL passwords in containers.

Giving a site the CA certificate

A binding hands the service the organization CA in one of two forms, so you never have to download it:

VariableWhat it holdsWhich service gets it
<PREFIX>_CA_CERTThe certificate as textA service that runs in a container
<PREFIX>_CA_FILEThe path of a file that holds the certificateA site that runs on the server itself, such as a PHP site; a container also gets it, pointing at /run/secrets/<PREFIX>_CA_CERT

A site on the server gets a path rather than text because a web server mangles a value that spans several lines. TurboPanel writes the file into the site's .turbopanel-hosting folder, readable only by the site owner's Linux user, and refreshes it on every deploy. <PREFIX> is the key prefix of the binding, DATABASE by default.

For example, a PHP app that asks for a CA file in its database settings can read the path from the variable:

PHP
$caFile = getenv('DATABASE_CA_FILE');
$pdo = new PDO($dsn, $user, $password, [
    PDO::MYSQL_ATTR_SSL_CA => $caFile,
]);

In the verify-ca and verify-full modes a PostgreSQL connection string also names this file with sslrootcert; a MySQL URL is unchanged. To read the path or other binding values under other names, see Reading a database binding from any variable.

If the app's own settings page takes a plain path instead, open the binding in TurboPanel, read the value of DATABASE_CA_FILE and paste it there. The certificate is public, so the file holds no secret. See Organization CA for rotation.

SSL modes

ModePlaintext client refused?What the connection string tells the driver
disablenono TLS
allow, prefernotry TLS, fall back
require (default)yesTLS, no verification
verify-cayesTLS, verify the CA
verify-fullyesTLS, verify CA and hostname

Resolution is three-layer — the cluster's own override, then the organization default (Managed → Settings), then the platform default require. Leaving a cluster on inherit means an organization change applies to it later; setting a mode pins it.

Users and databases

Data tab.

Rotate root shows a new root password once. Root is platform-suffixed (postgres_… / root_…); the bare engine admin name is never a login.

Create user: a short name and a Connection role — read-write (routed to the primary) or read-only (routed to read-eligible replicas; on a cluster with no replica it goes to the primary, so a login that may only read works on a single server). The password is shown once; Rotate and Delete act per user.

Create database / Delete database. The initial database and the root user cannot be dropped.

Who sets a login's permissions

Every login has a permission mode that says who decides what it may do inside the databases you list:

  • Recipe (the default for new logins) — TurboPanel sets the permissions from the choices you make, and puts them back the way you chose them whenever the cluster is applied.
  • Manage permissions myself — you set the permissions yourself, in SQL (GRANT and REVOKE, the commands that give or take away a permission). TurboPanel never resets the permissions of a login in this mode. It still looks after the login itself: it creates it, sets its password, keeps it able to log in and never a superuser, applies its connection limit, and lets it connect to the databases you listed (everyone else stays blocked from them). Anything below that, such as which tables it can read, is left exactly as you made it.
  • Preset — logins created before permission modes existed. They behave as they always did: the panel resets their permissions to the one you picked (owner, read-write or read-only) on every apply. They keep working with no change.

You can switch a login to Manage permissions myself at any time. Switching it back to panel-set permissions asks you to confirm first, because the panel will then reset the login's permissions and remove grants you made by hand. A read-only Postgres login moved to "manage permissions myself" keeps its read-only default until someone resets it by hand.

Password changes must go through the panel. The connection listener keeps its own copy of each password, so a password changed only in SQL leaves the listener holding the old one and the login stops working. Use Rotate instead.

A login can also be marked as used by a database tool (a desktop client such as DBeaver or Sequel Ace). Tool logins always go to the primary and are never split between a writer and a reader, because those tools run setup commands that pin a session to one server.

Where a login can connect from, and how many connections it may hold

By default a login can be used from anywhere the listener is reachable. For each login you can narrow that to a list of places. The choices are:

PlaceWhat it allows
Anywhere (any)No limit. This is the default and is the same as not setting a list.
This server only (internal)Programs on the server itself and containers on it.
A server of your organization (server:<id>)Every address of that server (public, private network and mesh). The addresses are looked up again whenever the server's database front door is updated.
An address (address:<value>)One IP address, an address prefix ending in % such as 203.0.113.% or 2001:db8:1:%, or a range that can be written as such a prefix.

Ranges are turned into prefixes when you save. The database front door can only match one exact address or a prefix that ends in %, so only these ranges work: IPv4 /8, /16, /24 and /32, and IPv6 ranges that end on a whole 16-bit group (/16, /32, /48, /64 and so on up to /112). Any other range is refused with a message asking you to list the addresses or use a prefix. An empty list is refused; choose Anywhere to remove the limit.

The login still connects, then every query is refused. A limited login signs in from anywhere, and the refusal appears at the first query with the message "This login is not allowed from this address…". A tool may look connected and then fail at once. Some tools (for example Adminer) may show an empty page with no error. This is by design: it is what the shared database front door can do today. A firewall layer that blocks the connection itself comes later.

What "This server only" means. Docker shows some local callers (a program on the server connecting to 127.0.0.1, a container on the server's default network) as the address of its network gateway. The gateway counts as part of the server, so anything that arrives as the gateway address is treated as local. Internet clients are seen with their real address, so they are refused. A program on the server that connects to the server's own public address is also seen with that public address, not as local, so This server only refuses it; add the server itself (A server of your organization) to allow that path. Limits are never tied to your plan.

Connection cap. Set maximum connections (1 to 10000) to stop one login from using every connection. Once the login holds that many sessions the next one is refused by the database front door. Leave it empty for no per-login cap.

Over the API, POST and PATCH /api/client/v1/environments/{id}/managed/users[/{principalId}] take allowedSources (a list; null on PATCH removes the limit) and maxConnections (null on PATCH removes the cap). A PATCH with dryRun: true lists in plain words what the change will do. The root login and the system logins are not affected: the root login has its own rule, above. A server whose daemon is too old to enforce limits answers 409 managed_login_limits_need_daemon_update instead of saving a limit it could not enforce.

A login's name must be unique across every cluster on servers the same organization owns — username_in_use if another cluster has it, managed_user_exists if this one does. postgres, root, mysql and superadmin are reserved, and so is every name that starts with tp_ (TurboPanel uses that prefix for its own accounts).

Connect straight through (PostgreSQL only)

Each PostgreSQL login has a switch, Connect straight through (no connection sharing). When it is on, the login's connection goes straight through the database front door to the server: one server connection per client session, no connection reuse, and no read split.

  • Why it exists. Some drivers send a Flush message after preparing a query, for example the Node postgres driver and tools built on it, such as drizzle. The shared path of the front door does not support that message, so every query that carries values fails with "Feature not supported". A login that connects straight through is not affected.
  • Who has it on. Migration-level logins have it on by default, so migration tools work out of the box. It is off for every other login. You can turn it on or off for any login, or go back to the default.
  • Limits. It cannot be combined with a limit on source addresses: a login with a source limit always uses the normal path, because the limit is enforced there. It is not available for MySQL or MariaDB logins, the root login or the replication login. A Migration-level login set to read-only routing keeps the shared path and its replica routing.

Over the API, POST and PATCH on the managed users take straightThrough (null on PATCH goes back to the default), and each login reports straightThrough (the value in effect) and straightThroughDefault (true when it is the default rather than your choice). A PATCH with dryRun: true lists the change in plain words.

The three jobs: read-only, read/write and migration

Each login has one level on each database it is listed for. The levels are jobs, not sizes: your app reads and writes data, a migration tool changes the shape of the database, and a reporting tool only looks.

JobWhat it can doWhat it cannot do
Read-only (read-only)Read rows and see how views are defined.Change anything. On MySQL and MariaDB it also cannot call stored functions or procedures (see below).
Read/write (read-write)Read, add, change and delete rows; call stored functions and procedures; lock tables; use temporary tables.Create, change, empty (TRUNCATE) or drop tables, indexes, views, functions, triggers or events. Hand its rights to anyone.
Migration (owner)Everything inside its own database: create, change and drop tables, indexes, views, functions, triggers and events.Reach any other database, create other logins or databases, or hand its rights to others (only a Database admin can).

What that means on each engine:

  • PostgreSQL: read-only logins read; read/write logins use everything the owner role makes but cannot create or alter its tables, empty one (TRUNCATE) or point a foreign key at one (REFERENCES), and only the migration login can; an app that empties tables in its tests needs the migration login for that (on a database made before owner roles, a read/write login can still create tables in a private schema of its own); the migration login acts as the database's owner role. See Owner roles and migrations logins.
  • MySQL and MariaDB: the same three jobs, set directly on the database. Anything the migration login creates is usable by the read-only and read/write logins at once, with no extra step. A read/write login's temporary tables last only for its own session and never touch your tables.
  • Stored functions on MySQL and MariaDB. By default a stored function or procedure runs with the rights of the login that made it, not the caller. A read-only login could therefore change data through one, so read-only logins are not allowed to call them, and a SELECT that uses such a function fails with "execute command denied". Use a read/write login for queries that call functions.

Tighter read/write on MySQL and MariaDB. Earlier versions gave a read/write login the right to create, change and drop tables as well, which made it the same as a migration login. That is fixed, and it applies to every existing read/write login, not just new ones: the next time the cluster is applied, each read/write login loses those rights, and each migration login loses the right to hand its rights to others. There is no grace period. If your app runs its migrations with a read/write login, give the migration tool its own login with the Migration (owner) level first, and keep the app on read/write. Logins set to Manage permissions myself are never touched. One right stays: a login that created triggers or scheduled events keeps the right to run them, because a trigger stops working (and blocks writes to its table) and an event stops firing if its creator loses that right. Recreate those with the migration login, and the right is taken back at the next apply.

The server's TurboPanel daemon must be up to date to enforce this. Until it is, TurboPanel refuses to create a panel-managed read/write login on MySQL or MariaDB, or to change a login to read/write or add a database to one (managed_readwrite_needs_daemon_update), rather than hand out one that could still change tables. An out-of-date daemon also still gives the migration login the right to hand its rights to others. Update the server, then try again.

Owner roles and migrations logins (PostgreSQL)

In PostgreSQL, whoever creates a table owns it, and only the owner can change it or hand out access to it. That causes a classic problem: a login that runs your migrations (the scripts that change the shape of the database) creates a table, and the logins your app uses cannot read it until someone grants access by hand.

To avoid that, every new PostgreSQL database gets an owner role. A role is a named bundle of permissions; an owner role is one that owns the database and everything created in it, and that no one can log in as. TurboPanel makes three for a database called shop:

  • tp_shop_owner owns the database and every table, view and sequence made in it.
  • tp_shop_rw can read and write whatever the owner role creates.
  • tp_shop_ro can only read it.

Tables made by the owner role are open to the other two at once, with no per-table grants. The names are TurboPanel's: you do not log in as them and you should not change them by hand. They are removed when you delete the database.

Logins join these roles for you:

  • Read-write logins can use everything in the database.
  • Read-only logins can only read.
  • Owner logins become the database's migrations login: it is allowed to act as the owner role, and it starts every session in that database already acting as it. So a table created from your migration tool, or by hand in a desktop tool, belongs to the owner role and the app logins can use it right away. A migrations login holds no extra rights on its own; the rights come from acting as the owner role in that one database. (On a PostgreSQL 15 cluster the login is instead set not to inherit the rights of any role, across the whole cluster. New clusters use PostgreSQL 18, where the setting is per role.)

Moving a login between these levels updates the roles on the next apply, and a login that is taken off a database loses its role there.

The first database of a new cluster gets an owner role as well, as soon as the server's TurboPanel daemon is up to date. TurboPanel moves it onto its owner role while it is still empty. If anything is already in it, it keeps its owner.

Databases you made before owner roles existed keep exactly the owner and permissions they have today. TurboPanel does not convert them: moving a database onto an owner role changes who owns your data, so it will only ever happen as a separate, deliberate action with a backup first. To get an owner role for an old database, create a new database, then copy your data across. A restore into an owner-role database brings tables back owned by the platform's admin account until you change them.

Choosing the database owner (PostgreSQL)

Every new PostgreSQL database is made with an owner role and is owned by that role or by a login you pick, never by the cluster's root login or the platform's admin account. Databases made before owner roles keep their current owner. By default the owner is the owner role, which no one logs in as. When you create a database through the API you can instead pick a login as the owner by sending its id as ownerLoginId (usually your migrations login or your read/write login):

  • The login must be an Owner (migrations) or Read-write login that TurboPanel manages. A read-only login, a Database admin login, the root login and a login set to Manage permissions myself cannot be an owner (managed_owner_login_invalid).
  • The database is added to the login's list, so it can connect to it.
  • The login owns the database itself, but it works through the owner role like a Database admin login does, so tables it creates still belong to the owner role and your other logins can use them at once. Tables created by another migrations login are usable too.
  • Your other logins keep their usual access through the owner role.
  • You cannot change the owner after the database is made yet (managed_database_owner_change_not_available). Choose it when you create the database. To use a different owner now, create a new database and copy your data across.
  • A login that owns a database cannot be taken off it or changed so that it can no longer own it (made read-only, a Database admin login, or set to Manage permissions myself). If you delete the login, each database it owned goes back to its default owner role.
  • The owner of every database that has an owner role is shown in the database list (owners).

MySQL and MariaDB have no database owner. A login there gets rights on a database, and you choose which logins and rights when you create the login.

There is no way to opt out of the owner role when you create a PostgreSQL database. Sending ownerRole: false is refused with managed_owner_role_required; leave ownerRole out (sending true does the same). A PostgreSQL database name can be at most 54 characters, because the owner role's name is built from it and role names are limited to 63 characters. A longer name is refused with managed_owner_role_name_too_long; choose a shorter name. If a server's TurboPanel daemon is too old to make owner roles, it still makes the database without one until you update the server. MySQL and MariaDB have no owner role and are not affected.

The Database admin login

Sometimes you want one login for a desktop tool such as DBeaver or Sequel Ace that can hand out permissions, without handing over the cluster's root login. That is the Database admin login (permission admin in the API). It is always a database-tool login, so it goes to the primary and is never split between a writer and a reader. You can turn that off with tool: false.

  • PostgreSQL: the login joins the owner role of each database you list, so it holds the owner role's rights directly and can run GRANT on everything the owner role owns, and it works as the owner role in that database, so tables it creates are usable by your other logins. It can not create other logins, create databases, bypass row security, replicate, or act as a superuser. Creating logins stays a job for TurboPanel. On a database made before owner roles existed there is no owner role to join, so the login gets read and write access to the data there instead. It is never the owner and cannot hand out access to others on that database. TurboPanel never refuses to add the login: the answer lists, in plain words, what the login got (notes). If the server's TurboPanel daemon is older than owner roles, the login is added as a read/write login until you update the server and apply again. The notes always say exactly what the login got.
  • MySQL and MariaDB: the login gets all rights on each database you list, with the right to pass them on. It is the only level that can: the Migration level has the same rights without it. It never gets the rights that affect the whole server: it cannot create or change other accounts and cannot act as another user.

A Database admin login is never read-only. TurboPanel owns its roles and memberships and re-applies them on every apply, so changes you make to the admin's own rights in SQL are put back; what the admin grants to other logins is yours and is left alone. Pair it with Manage permissions myself on the logins you hand permissions to. (On MySQL and MariaDB, moving a login to a lower level also takes back the rights of the higher one at the next apply, including the right to hand rights to others.)

All Databases

A login normally lists the databases it may use. Choose All Databases on the login form and the login covers every database of the Database Cluster instead, including ones you add later. It works for every kind of login. The login list shows "All databases" in place of the list, and All Databases on the edit form turns it off again; the login then goes back to the databases picked for it.

Two switches decide whether a login may use it, and both must be on:

  • Organization: Allow All Databases Logins in the organization's database settings. It is on by default.
  • Database Cluster: Allow All Databases Logins on the Database Cluster. It is off by default, so each Database Cluster opts in.

While either switch is off, the All Databases choice on the login form is unavailable and a line says which switch is off. Turning a switch off also takes the access away from logins that already use All Databases at the next apply: each falls back to the databases picked for it (only those the Database Cluster still has). The backup login is not affected; it always reads every database.

Admin tools

An Admin Tool is a web tool that TurboPanel runs for one Database Cluster, signed in with its own login. Add one from the Database Cluster's Data tab, in the Admin Tools section under Users & databases.

ToolEngines
phpMyAdminMySQL and MariaDB
pgAdminPostgreSQL
AdminerPostgreSQL, MySQL and MariaDB

Add a tool

Choose Add Admin Tool, then:

  1. Pick the Tool. Only the tools that fit the engine are offered, and the first one is the default.
  2. Enter a Hostname, such as db-admin.example.com. Point that name at the Database Cluster's server before you deploy, like any site. A name another site already answers on is refused.
  3. Choose Access: Database Admin (the default) or Read-Only. Database Admin can change data and tables in every database of the Database Cluster, including ones added later. Read-Only can look at every database, including ones added later.
  4. Choose Add and Deploy.

The Database Cluster needs at least one database first. The tool runs on the server of the Database Cluster's primary, and, for Adminer and pgAdmin, the daemon on that server must be up to date (phpMyAdmin has no such need). TurboPanel gives the tool its own login, listed on every database of the Database Cluster. It is separate from the All Databases switches above, so those switches do not govern it.

The sign-in is shown once, so copy it before you continue:

  • phpMyAdmin and Adminer: a Username and Password. They belong to the tool's login.
  • pgAdmin: a Sign-In Email and Sign-In Password for pgAdmin's own web account. The email is the address of the person who added the tool. pgAdmin connects to the database by itself, so you never type the database password. pgAdmin does not accept an address on a special-use domain, so use an address on a public domain. It also cannot use an address that starts with a digit or has a / or \ before the @. The domain needs a dot.

If the tool's login could not get the full rights you asked for, for example because a database has no owner role or the server's daemon is older, the screen shows a short note saying what the login got instead.

TurboPanel puts no extra sign-in in front of the tool. Anyone who reaches the address sees the tool's sign-in page, so use a strong password and keep the address private. The tool checks the database listener's certificate against the Organization CA in every SSL mode.

Manage a tool

Each tool has a card with a link to its address, its access, its login name and a deploy state: Deploying, Running or Failed.

  • Open goes to the tool's address.
  • Reset Password makes a new password, shows it once and deploys the change. The old one stops working. For pgAdmin this resets the sign-in password.
  • Update Tool appears with an Update Available badge when TurboPanel has a newer version of the tool than the one running. It asks you to confirm, then deploys.
  • Remove asks you to type the tool's name. It removes the tool, its address and its login; your databases are not touched. If the login cannot be removed, the tool is still gone and the screen tells you to remove the login from the Users list.

pgAdmin keeps no storage of its own, so its saved queries and settings are lost when you update it or reset its password. The tool's login in the Users list is marked as used by the tool, and its password is reset only from the tool's card.

While a tool exists, the Database Cluster's first database cannot be dropped. Remove the tool first.

Name schemes

Every login and system user has two names: the display name you typed, and the system name the server or database engine actually sees (the applied name). A name scheme decides how the second is made from the first. The control plane derives the system name; clients never supply it.

SchemeSystem nameExample
plainexactly what you typedbob
partial (default)what you typed, then _ and 11 random lowercase letters and digitsbob_x7k2m9qpz1a
random12 random characters: a leading letter, then 11 lowercase letters and digits. It never starts with a tp prefix and carries no trace of the typed name.u7k2m9x4qpz1

The scheme applies to every kind of login or system user (both forms of a principal): Linux, SFTP and SSH system users, managed database logins (PostgreSQL, MySQL and MariaDB, within each engine's identifier limit), the managed admin login, and the replication login. The admin login is never plain: a plain request for it is applied as partial. System users declared in a compose document follow the organization default.

The typed name is at most 16 characters under partial, so the whole name stays within 28 characters. On the server each Linux user gets a group of the same name, so a name that matches a system or administrator group (such as sudo, admin, wheel or staff) is not allowed.

Three places choose a scheme:

  • Organization default. An owner or manager sets it (default partial).
  • Per login or system user. Each new login or system user can pick a scheme; it starts at the organization default.
  • Organization lock. An owner or manager can force one scheme for every new login or system user. A request for a different scheme is refused with principal_scheme_locked (409). The lock can be turned off and on again.

Existing logins and system users are never renamed by a default or a lock change. The chosen scheme is stored on the login or system user (options.nameScheme). An organization that predates schemes keeps its old behaviour: randomized usernames on means partial, off means plain, and unset means partial.

API. GET and PUT /organizations/:id/principal-defaults read and write { nameScheme, schemeLocked }. Creating a login or a managed user accepts an optional nameScheme; omit it to use the organization default.

Replicas, promotion and disaster recovery

Overview tab — the topology.

Replica classWhereWhat it is for
Failover replicaSame datacenter network as the primaryAutomatic failover when the primary dies; a switchover on demand.
Remote / read replicaAny server in the organizationRead traffic close to consumers, and disaster recovery when the primary's site is down. Never promoted automatically.

MariaDB 12.3 stays on one server: Add replica and converting a replica to a failover member need MariaDB 11.8 until failover for 12.x is supported.

Add replica, pick the class and the server, and whether it serves read traffic (readEligible). Apply.

Promote a failover replica for a planned switchover: the old primary becomes a replica, the endpoint does not change.

Promote for disaster recovery a remote replica only when the primary's site is gone: one writer results; any failover replica left in the old datacenter network is rewritten to a read replica.

Remove a replica that is no longer needed. The primary cannot be removed.

Manual promote

Promote on a failover replica switches over: the old primary is asked to stop if its server is online, the replica becomes the writer, and the endpoint is pointed at it, so the connection string does not change. The replica must be a failover replica that is streaming and not far behind (no more than 64 MiB or 30 seconds) on a live health check made when you press the button. For MySQL and MariaDB the replica must also have applied every transaction it received; for PostgreSQL it must have replayed nearly all the WAL it received. If that check refuses, Promote anyway (API { "force": true }) skips the lag and health checks and accepts possible data loss. A read replica can only be promoted with Promote for disaster recovery.

The old primary becomes a replica. If it needs to be re-seeded from the new primary, it shows needs resync; press Resync on that replica (POST /environments/:id/managed/members/:memberId/resync).

Automatic failover

When a primary dies, the platform can promote a failover replica in the same datacenter network on its own. The endpoint your applications dial does not change.

  • The database dies on a server that is still connected. PostgreSQL is checked by the daemon on the primary's server. MySQL and MariaDB are watched by Orchestrator. The platform stops the old primary before it promotes. If it cannot prove the old primary is stopped, nothing is promoted and the recovery history shows a blocked row: Automatic failover blocked: unable to verify previous primary is fenced.
  • The whole server goes silent. About once a minute the control plane looks at servers that went offline. It waits a couple of minutes, then promotes only if the other members of the cluster agree the primary has stopped replicating. It refuses when many servers are offline at once, or when a replica is still streaming from the primary (the server is probably alive and only its link to the control plane is down).

Automatic failover needs a healthy, caught-up failover replica in the same datacenter network. After one starts, another automatic failover for that cluster waits 15 minutes. It does not run while the control plane is down. A primary that dies while a create or change is still settling (about the first ten and a half minutes) is not failed over until that window ends, and one that dies in the first moments of it is not failed over at all. The control plane operator can turn automatic failover off for a deployment; see Control plane configuration. Manual switchover and disaster recovery do not depend on it.

A blocked recovery row. A refused automatic failover is recorded in the cluster's recovery history as a blocked row. Nothing was fenced or promoted, and the cause is in the row:

ReasonMeaningWhat to do
auto_failover_disabledThe switch is off on this control plane.Turn it on, or promote by hand.
CooldownAn automatic failover started less than 15 minutes ago. A refusal does not extend the cooldown, and the report is sent again after it.Wait, or promote by hand.
Unable to verify previous primary is fencedAutomatic failover could not prove the old primary was drained and stopped, so nothing was promoted and that member is still the primary. If a failover replica was already chosen, the row keeps that target and the 15-minute cooldown still applies — the next automatic attempt is cooldown, not an immediate fencing retry.Stop the old database if you can, wait out the cooldown, or use Promote anyway / { "force": true } on a failover replica if you accept split-brain risk.
no_command_queueThis control plane cannot send commands to servers.A deployment fault; contact whoever runs the control plane.

A row can also be blocked because no same-datacenter failover replica was healthy enough to promote. A blocked row does not hold anything up: Promote and disaster recovery stay available.

What to expect when a database fails over

Plain-words guide for the person on the Overview tab. Recovery history shows what the platform tried; the connection string your apps dial does not change after a successful switchover or automatic failover.

After a switchover or automatic failover

The former primary is demoted to a replica and shows needs resync until it has been re-seeded from the new primary. Press Resync on that replica (two-step confirm: Wipes this replica's data and re-seeds it from the primary.). The platform wipes its data directory and copies from the new primary. Any writes the old primary took while it was isolated are discarded and exist nowhere else.

If an automatic failover marks a member needs resync but ends blocked, nothing was promoted: that member is still the primary and its database may still be running. Resync on a member that is still the primary answers 409 managed_member_is_primary.

When the primary's server dies

When a whole server is silent, the platform cannot stop the database on it. If the other members agree the primary has stopped, a failover replica is promoted without stopping the old primary, and the old member is marked needs resync. Until the platform has demoted and stopped the old database, it may still accept writes if the server comes back, so check Overview before you assume the old primary is safe.

A planned reboot or update of that server can delay the decision, but not for long: about seven and a half minutes after the server went offline, the attempt ends with a blocked row saying the server has been silent too long for an automatic failover to be safe. If nothing was promoted and you want a new writer, open Overview, pick a healthy same-datacenter failover replica and press Promote. Do not bring the old server back online and promote while it is still the primary.

Backups from before the failover

Each backup file lives on the server that ran the primary when the backup was taken (the API exposes that host as storedOnServerId on each backup row). After promotion the primary moves; restore always targets the current primary's server.

What you see: Restore answers 409 backup_on_other_server — the response names the server that stored the file (the primary when the backup ran), says it can only be restored there, and tells you to take a new backup on the current primary or switch back first. No restore is enqueued.

What to do: managed backups are logical dumps, not point-in-time recovery. Back up now on the new primary creates a new file on the new writer's server; restoring it does not apply the older backup that returned backup_on_other_server. To use a pre-failover dump, restore it on the server that still holds the file (or switch the primary back to that server first); otherwise take a fresh backup after failover and restore that copy on the current primary.

Short write outages and listener reloads

Switchover or engine-dead automatic failover: the shared listener drains the old primary, stops it, promotes the replica, and repoints ProxySQL. Host-loss automatic failover skips drain/stop on the silent host (attested fence) but still promotes and repoints listeners on connected servers. Read-write clients should expect a short gap — connection refused, timeout, or driver errors. Use connection retry/backoff; the host and port in the connection string stay the same.

Adding a replica (or changing who serves reads) enqueues managed.ingress.reconcile on every server that fronts the cluster so ProxySQL picks up the new backend. While that reconcile runs, read-write logins can see brief connection or write errors. Retry for a few seconds; a fresh ProxySQL stack can take a few seconds before its admin port answers.

External access and the listener

With Allow external access off, SQL listeners are on 127.0.0.1 only (15432 / 13306). With it on, the same ports publish on all host addresses (0.0.0.0). Failover does not move the endpoint your apps dial — only which backend ProxySQL treats as the writer. The per-server switch and API are under External access below.

MariaDB 11.8 vs 12.3

MariaDB 11.8 is the default series and supports failover replicas. MariaDB 12.3 is creatable on one server only (failoverCapable: false in the release catalog): Add replica and Convert to failover are refused until failover tooling can read the series' read_only values. Existing 12.3 databases keep running; plan HA on 11.8 for new pairs.

Orchestrator login and datacenter network placement

MySQL and MariaDB automatic failover uses Orchestrator (one stack per organization on servers that host HA members). Two credentials are organization-wide, not Linux accounts:

  • A topology database login — one derived MySQL user every HA cluster in the organization accepts so Orchestrator can register all members.
  • Orchestrator HTTP basic auth and a Raft token — shared by every Raft peer in the org.

Raft voters are chosen inside one datacenter network (selectHaRaftMembers): both servers in a failover pair must sit in the same datacenter network so they share one Raft group. Postgres HA does not use Orchestrator; engine-dead reports on a live server use the Postgres probe instead.

ProxySQL and 4 KiB kernel pages

Shared ProxySQL aborts on hosts whose kernel uses 16 KiB or 64 KiB pages (common on Raspberry Pi 5 until switched). Consumer servers need the proxy too — apps reach databases through 127.0.0.1:15432 / 13306 even when no engine runs there.

What to do: switch the Pi to the 4 KiB kernel before enrolling it — Raspberry Pi, databases and memory limits.

Backups

Backups tab, for all three engines. A backup is a logical dump of one database, stored on the server that runs the cluster's primary.

EngineDumpFile
PostgreSQLpg_dump custom format, per database.dump
MySQL, MariaDBmysqldump, per database.sql

Back up now, restore, delete

ActionWhat happens
Back up nowDumps the database on the primary's server and records it in the list.
RestoreTyped confirmation (the cluster's name). Restores that backup into the cluster in place. A backup made by a schedule restores the same way.
DeleteTwo presses. Removes the backup.

Each backup is checked with a SHA-256 checksum when it is written and again before a restore; a restore refuses a file that no longer matches. Backups are metadata in the app: there is no download, and the file lives on the server (under managed/<cluster id>/ in the backup folder, which is /backup or the directory the operator set with TURBOPANEL_BACKUP_DIR; the app stores each backup's path relative to that folder). Manual backups to keep in the cluster's settings (1–50) prunes the backups made with Back up now; each schedule keeps its own count.

Schedules

The Schedules panel on the Backups tab makes backups on a timetable. Only organization owners and managers see it. The server runs them on its own, even while the control plane is unreachable, and a run that was missed because the server was off happens once when it is back.

Every new managed database starts with one schedule named Daily: every day at 03:MM server time (the minute is spread per database so databases on one server do not all start together), keeping the most recent 7. It carries an Automatic badge. Databases that existed before schedules were added do not get one; add a schedule to those yourself.

Add schedule, give it a Name (up to 64 characters) and choose Schedule: Hourly, Daily (a time, HH:MM, 24-hour), Weekly (a day and a time) or Advanced: cron (five fields: minute, hour, day of month, month, day of week).

Pick a Timezone or leave Server time to follow the server's own clock.

Set Backups to keep (1–50) and leave Enabled on. Add schedule saves it.

Each row shows the schedule in words (for example Daily at 03:12), how many it keeps, when it runs next, and the last run (Succeeded or Failed, with the error). Enabled / paused switches it off without losing it, Edit changes it, Run history lists recent runs (newest first), and Delete removes the schedule and stops its timer: backups it already made stay on the server.

What to know:

  • A schedule's count prunes only that schedule's own backups, so an hourly schedule keeping 24 never removes a daily schedule's backups or a manual one. Each schedule's files live in their own folder on the server.
  • A database can have at most 20 schedules.
  • A schedule that cannot run on the server is refused when you save it: @reboot, a cron line that fixes both a day of the month and a day of the week (cron would treat that as either, which is rarely what you mean), and a step in the day-of-week field such as every other Tuesday.
  • After a save the app says when the server could not be reached; it picks the change up when it reconnects.
  • A run is refused (and recorded as failed) when another backup or restore of the same cluster is running, or when the server is short of disk space (less than twice the previous backup's size, and never under 256 MiB).
  • Backups stay on the server's own disk: they do not protect against losing the whole server. Offsite storage is not built yet.
  • Schedules for storage volumes are separate and API-only today: see Storage and variables.

External access

One setting, per server: Allow external access to the databases on this server. The default is No.

A server runs one listener for every database on it, so who can reach it from outside is a fact about the server, not about one database.

SettingWho can connect
No (default)Only services on that server: sites run by a Hosting Account (they connect to 127.0.0.1 on port 13306 for MySQL and MariaDB, 15432 for PostgreSQL), and containers bound to the database over the organization's managed Docker network. Nothing off the machine can connect.
YesThe same ports are also published on all of the server's addresses. Anyone who can reach the server's network can try to connect. TurboPanel's firewall is a preview only and enforces nothing yet, so restrict access with your cloud or provider firewall. It covers every database on that server.

The root login only works from your own machines

Each database comes with a root login (postgres_… or root_…). It can do everything, so TurboPanel does not let it be used from the internet, even when external access is Yes. The root login works only from:

  • the server itself (including sites run by a Hosting Account on that server),
  • containers on that server, and
  • the other servers of the same organization.

From anywhere else, such as your laptop, the root login can still sign in, but every query is refused with the message "This login is not allowed from this address". The refusal shows up on the first query, not when you connect, so a tool may look connected and then fail. Some tools (for example Adminer) may show an empty page with no error. For laptop tools, create and use a normal (non-root) login instead. Normal logins are not affected by this rule.

A few details worth knowing:

  • Docker shows some local callers (for example a program on the server connecting to 127.0.0.1) as the address of its network gateway, so the gateway address counts as part of the server. Anything that reaches the database through that gateway is treated as local.
  • The list of your other servers is refreshed whenever the server's database front door is updated (any apply or binding change). A server you just added may need one of those before its root login works.

Find the switch in the create database form (it shows the chosen server's current value and warns when other databases already run there), in the database's Settings tab (one row per server that serves it, with how many other databases share it), and over the API at GET/PUT /api/client/v1/servers/{id}/managed-external-access (organization owners and managers). Saving tells the server at once; if the server is offline or the change cannot be delivered yet, it is saved and retried automatically, and the app shows it as waiting for the server. The Connect tab always lists the way in from this server only, and adds a way in from outside the server only while the setting is Yes (and the server has a public address or hostname).

Lifecycle and organization settings

  • Start / Stop / Restart act on the containers; stop keeps everything. Apply re-converges the cluster after a settings change.
  • Destroy removes the cluster and its data, after you type the project's name to confirm; a project or environment holding a live cluster cannot be deleted until it is destroyed (managed_runtime_present).
  • Managed → Settings (organization-wide): the default SSL mode, and the listener ports per engine family (1024–65535; 6032, 6132 and 45000–45999 are reserved). Blank = platform default. A port conflict on a host is only detectable when the listener is applied.

Reference

ItemValue
Enginespostgres, mysql, mariadb
Creatable seriesPostgreSQL 18 · MySQL 9.7 (default), 8.4 · MariaDB 11.8 (default, long-term support), 12.3 (one server only)
Variantsalpine, debian, oraclelinux9, ubi (two per series)
Listener portsdefault 15432 / 13306; range 1024–65535; reserved 6032, 6132, 45000–45999
SSL modesdisable · allow · prefer · require (default) · verify-ca · verify-full
Connection rolesread-write (default) · read-only
Replica classesfailover (same datacenter network) · read (anywhere)
Automatic failoverTURBOPANEL_AUTO_FAILOVER; 15 minute cooldown per cluster; engine-dead on a live server (Postgres probe / Orchestrator); whole-host loss via ha-host-loss for PostgreSQL, MySQL, and MariaDB (metadata.detector = host-loss on host-loss blocked rows)
Recovery kindsautomatic-failover · switchover · disaster-recovery
Applied loginby name scheme: plain, partial (<short>_<11 random>, default) or random; the admin login is never plain
BackupsPostgreSQL pg_dump -Fc (.dump), MySQL and MariaDB mysqldump (.sql), per database; manual keep 1–50; up to 20 schedules per database, each keeping 1–50; no download; local disk only

Errors

CodeStatusMeaning
managed_engine_unavailable400The engine is not released yet.
managed_version_unsupported422The series or variant is not creatable.
managed_series_immutable422A cluster's series cannot change after provisioning; only the variant may.
server_placement_required409No server chosen for the primary.
server_offline409The action needs the member's daemon connected.
managed_busy409The cluster is provisioning or applying; wait for it.
managed_member_exists, managed_member_is_primary, managed_primary_missing409The server already holds a member of this cluster (one member per server); the primary cannot be removed; the cluster has no primary.
managed_replica_not_promotable422Only a failover or read replica in a promotable state can be promoted.
untrusted_network_needs_fabric, failover_replica_requires_datacenter_transport422A failover replica needs a trusted datacenter network path to the primary, or TurboFabric over an untrusted one.
fabric_address_required422A remote replica or consumer needs a TurboFabric address on its server.
managed_private_port_exhausted409The server has no private replication port left (45000–45999).
managed_listener_bind_conflict422The listener port is already bound on that server.
managed_user_exists, database_exists409The user or database already exists on this cluster.
username_in_use409A login with that name exists on another cluster in the organization's servers.
username_reserved400postgres, root, mysql, superadmin, and any name starting with tp_.
managed_owner_login_invalid, managed_owner_login_unsupported400The login picked as a database owner cannot own one (it must be a migrations or read/write login that TurboPanel manages), or the engine has no database owner (MySQL, MariaDB).
managed_database_owner_needs_daemon_update409The server's TurboPanel daemon is too old to give a database a login as its owner. Update the server, or leave the owner out.
managed_database_owner_change_not_available409Changing the owner of an existing database is not available yet. Choose it when you create the database.
managed_login_owns_databases409The login owns one or more databases, so it cannot be taken off them or made read-only.
managed_admin_login_not_read_only400A Database admin login cannot be read-only.
managed_owner_role_unsupported, managed_owner_role_name_too_long400Owner roles are PostgreSQL only, and need a database name of at most 54 characters.
principal_scheme_locked409The organization locks the name scheme and the request asked for a different one.
managed_login_sources_empty, managed_login_sources_invalid, managed_login_source_invalid, managed_login_sources_too_many, managed_login_sources_any_alone, managed_login_source_server_unknown400The allowedSources list is empty, malformed, too long, mixes any with other places, or names a server that is not the organization's. The response says which.
managed_login_source_range_not_exact400The range cannot be matched exactly. List the addresses or use a prefix.
managed_login_max_connections_invalid400maxConnections must be a whole number from 1 to 10000.
managed_login_limits_need_daemon_update409The server's daemon is too old to enforce login limits; update the server first.
straight_through_conflicts_with_source_limit400A login that connects straight through cannot be limited to certain addresses. Turn one off.
straight_through_postgres_only400Connecting straight through is only available for PostgreSQL logins.
straight_through_login_not_allowed400Connecting straight through can only be set on logins you created, not on the cluster administrator or replication logins.
managed_readwrite_needs_daemon_update409The server's daemon is too old to make a MySQL or MariaDB read/write login data changes only; update the server first.
managed_user_has_bindings, managed_database_has_bindings409Sever the service bindings first.
cannot_drop_root_user, cannot_drop_initial_database, cannot_rotate_replication_user, use_root_password_route400 / 409Platform-managed accounts and the initial database; rotate root through Rotate root.
managed_backup_unsupported400The engine does not support backups.
backup_not_found404No backup with that id.
backup_policy_invalid400A schedule field is wrong (the response names the field): name length, how many to keep, or an unknown preset.
backup_schedule_invalid, backup_timezone_invalid400The schedule or timezone cannot be used; the response says why.
backup_target_unsupported400This target cannot have a schedule through this route.
backup_policy_not_found404No schedule with that id on this database.
backup_policy_limit409The database already has 20 schedules.
backup_on_other_server409The backup file is stored on the server that was primary when it ran; restore only works on that host — take a new backup on the current primary or switch back first.
managed_runtime_present409Destroy the cluster before deleting its project or environment.
managed_destroy_failed502The daemon could not tear the cluster down; see the server's logs.
managed_settings_invalid, managed_credential_not_sealed, root_principal_missing, daemon_key_unavailable500 / 503Control plane faults; not something a form change fixes.
managed_login_all_databases_not_allowed400All Databases is switched off for the organization or the Database Cluster. The message names the switch.
managed_login_all_databases_conflict400Choose All Databases or a list of databases, not both. A login that uses All Databases cannot be given a list unless All Databases is turned off in the same change.
admin_tool_engine_mismatch400The tool does not work with this database engine.
invalid_hostname400The admin tool's hostname is not valid.
admin_tool_hostname_in_use, hostname_in_use409The hostname is already used by the web interface or by another site.
admin_tool_needs_database409Add a database to the Database Cluster before adding an admin tool.
admin_tool_needs_daemon_update409Adminer and pgAdmin need a newer daemon on the Database Cluster's server; update it before adding the tool (phpMyAdmin does not need this).
admin_tool_email_invalid400pgAdmin signs in with your email and does not accept this address. Use an address on a public domain that does not start with a digit and has no / or \ before the @ and has a dot.
Edit on GitHub

Last updated on

On this page