Dokploy provides first-class managed database support, allowing you to spin up fully containerised database servers directly inside your projects — no external cloud service required. Each database runs as a Docker service with a persistent volume, and connection credentials are automatically available as environment variables to other services in the same project.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Nettalco/dokploy/llms.txt
Use this file to discover all available pages before exploring further.
Supported Database Engines
PostgreSQL
The world’s most advanced open-source relational database. Supports any Docker Hub
postgres image tag for version selection.MySQL
The most widely deployed open-source relational database. Compatible with all
mysql image tags.MariaDB
A community-developed MySQL fork with additional storage engines and features.
MongoDB
A document-oriented NoSQL database designed for flexibility and horizontal scale.
Redis
An in-memory key-value store used for caching, sessions, pub/sub messaging, and queues.
libsql
A community open-contribution fork of SQLite designed to be used as a server, compatible with the Turso client libraries.
Creating a Database
Open a project
Navigate to the project where you want the database to live. Databases and applications in the same project share a private Docker network, enabling connection by service name.
Add a database service
Click Add Service and select the database engine you need (PostgreSQL, MySQL, MariaDB, MongoDB, Redis, or libsql).
Configure the database
Fill in:
- Name — a human-readable label for the service.
- Docker Image — the image tag to use, e.g.
postgres:16,mysql:8.0,mongo:7. This is how you pin a specific version. - Database name, username, and password (where applicable).
Connecting to Your Application
Every database service automatically exposes its connection string as an environment variable that you can copy and paste into any application in the same project.<appName> hostname resolves automatically within the shared Docker network — no manual IP or hostname configuration is needed. Open the Connect tab on any database service to copy the ready-to-use connection strings.
Internal connections use Docker’s overlay network and never leave your server. You do not need to expose a database externally just to connect an application running on the same Dokploy instance.
External Access
If you need to connect to a database from outside the server — for example, from a local database GUI like TablePlus or DBeaver — you can expose an external port.Set an external port
Enter an available host port in the External Port field. Dokploy checks whether the port is already in use before saving; if it is, you will see a conflict error naming the container that holds the port.
Database Versions
Dokploy uses standard Docker Hub image tags for versioning. When creating or editing a database, set the Docker Image field to the desired tag:To upgrade a database version, update the Docker Image field and click Rebuild. Always back up your data before upgrading between major versions.
Environment Variables
Each database service has its own Environment Variables tab where you can inject additional environment variables directly into the database container. This is useful for setting database-specific tuning flags or enabling plugins supported by the official Docker image.Stopping and Restarting
From any database detail page you can:| Action | Description |
|---|---|
| Stop | Gracefully stops the running container while keeping the volume intact. |
| Start | Restarts a previously stopped database container. |
| Rebuild | Pulls the latest image matching the configured tag and recreates the container, preserving the volume data. |
Moving Databases
A database can be reassigned to a different project environment using the Move action (found in the service’s settings menu). Moving a database updates theenvironmentId association — the underlying Docker service and volume remain on the same server unchanged.