Connect to a managed database
Create an isolated database, connect with a client certificate and replace an application identity from your dashboard.
Choose an engine and allocate resources
In New deployment, select Database. Redis needs 256 MB RAM, 25% CPU and 512 MB storage. PostgreSQL needs 512 MB RAM, 25% CPU and 1024 MB storage. MySQL and MongoDB each need 1024 MB RAM, 50% CPU and 2048 MB storage. Allow more room for your dataset, indexes and temporary work.
Each engine uses one slot and a dedicated data directory. Free can run Redis on a configured node. Hosting another project alongside the database requires a spare slot and sufficient resources in the same account plan. Start the deployment from Overview.
Download the two PEM files
Open Connection as the deployment owner. Save the client identity as client.pem and the server certificate as server-ca.pem. The client file contains a private key. For a Docker client, mount both files read-only and run the client as the user who owns the private key. That user also needs permission to enter the directory containing the files. The server file pins the identity of this database endpoint.
Set DB_HOST e DB_PORT to the hostname and port on the Connection page. Keep the hostname when verifying TLS. An HTTP domain, an IP address or another database’s trust file will not identify this instance.
chmod 600 client.pemIf Connection shows Allowed client IPs, save the public IPv4 address your application uses to reach the Internet. For a client behind NAT, use its outbound address. Repeat for each client address. Clearing the list blocks new connections until you save an address again.
Test the connection
mysql --host="$DB_HOST" --port="$DB_PORT" --user=app --ssl-mode=VERIFY_IDENTITY --ssl-ca=server-ca.pem --ssl-cert=client.pem --ssl-key=client.pem app -e "SELECT 1"PGSSLMODE=verify-full PGSSLROOTCERT=server-ca.pem PGSSLCERT=client.pem PGSSLKEY=client.pem psql -h "$DB_HOST" -p "$DB_PORT" -U app -d app -c "SELECT 1"mongosh --host "$DB_HOST" --port "$DB_PORT" --tls --tlsCAFile server-ca.pem --tlsCertificateKeyFile client.pem --authenticationMechanism MONGODB-X509 --authenticationDatabase '$external' --eval 'db.getSiblingDB("app").getCollectionNames()'redis-cli --tls --cacert server-ca.pem --cert client.pem --key client.pem --sni "$DB_HOST" -h "$DB_HOST" -p "$DB_PORT" PINGSQL clients use the app database and role. MongoDB authenticates the certificate subject against $external and grants read/write access to app. Redis authenticates the certificate during TLS negotiation and restricts the default user to data commands.
Replace a lost or expiring client identity
Stop the database and wait for Offline. In Connection, choose Rotate client identity and download the replacement. Restart, update your applications and reconnect. Rotation replaces this deployment’s trusted client authority. Previously downloaded identities fail the next TLS handshake. Client certificates last one year from issuance.
Recover persistent data
A restart reuses the volume. On nodes with online snapshots, Backups offers hourly database recovery points on Spark and 15-minute points on paid plans. History is 24 hours on Spark and 3, 7, 14 or 30 days on Relay, Circuit, Grid or Fleet. Restoring a point replaces database data while retaining the current connection identity. For a cold backup, stop writes, shut down the engine cleanly and capture the complete deployment volume. Restore to the same engine major version and verify an application record before serving traffic. Refresh the server certificate from Connection after restoring or replacing the server identity. Checkpoint timing and the consistency of snapshots taken during writes depend on your backup configuration.
These standalone deployments have their own slot and credentials. Creating one does not import data from a retired database addon. Keep any retained addon export until you have validated an explicit migration.
Use the REST API or MCP
Usa list_runtimes to find enabled profiles and minimum resources. Select mysql, postgres, mongodb o redis with create_deployment. Read the endpoint using get_database_connection o GET /api/v1/deployments/:id/database. Private identity downloads and rotation require the owner dashboard.