Dokploy provides built-in support for deploying and managing popular database systems. Each database runs as a Docker container with persistent storage, automated backups, and easy configuration through the UI.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/dokploy/dokploy/llms.txt
Use this file to discover all available pages before exploring further.
Supported Databases
PostgreSQL
Open-source relational database with advanced features
MySQL
Popular open-source relational database management system
MariaDB
MySQL-compatible database with enhanced features
MongoDB
Document-oriented NoSQL database for modern applications
Redis
In-memory data store for caching and real-time applications
Common Features
All database services in Dokploy share these capabilities:Quick Deployment
Deploy databases in seconds with sensible defaults. Each database is deployed as a Docker service with:- Automatic volume mounting for data persistence
- Pre-configured default ports
- Environment-based organization
- Resource limits and reservations
Connection Management
- Internal Access
- External Access
Applications within the same Dokploy environment can connect using internal DNS:
Resource Management
Control database resource usage through the UI:- Memory Reservation: Minimum memory guaranteed to the database
- Memory Limit: Maximum memory the database can use
- CPU Reservation: Minimum CPU cores allocated
- CPU Limit: Maximum CPU cores available
Resources are specified in Docker format:
- Memory:
256MB,1GB,2GB - CPU:
0.5,1.0,2.0(cores)
Volume Management
Each database automatically creates a Docker volume for data persistence:| Database | Mount Path | Volume Name Pattern |
|---|---|---|
| PostgreSQL | Varies by version | {appName}-data |
| MySQL | /var/lib/mysql | {appName}-data |
| MariaDB | /var/lib/mysql | {appName}-data |
| MongoDB | /data/db | {appName}-data |
| Redis | /data | {appName}-data |
Environment Variables
Add custom environment variables to configure database behavior:Database Operations
Lifecycle Management
Manage database state through the UI:Start/Stop
Control database availability without losing data. Stopped databases retain all data in volumes.
Moving Between Environments
Move databases between environments (dev, staging, production) while preserving:- Database credentials
- Environment variables
- Volume mounts
- Resource limits
Docker Image Selection
Dokploy allows you to specify custom Docker images for each database:Advanced Configuration
Custom Commands and Arguments
Override the default container command or add arguments:Docker Swarm Settings
For production deployments, configure advanced Docker Swarm options:- Health Checks: Monitor database health and automatic restarts
- Restart Policies: Define restart behavior on failures
- Placement Constraints: Control which nodes run the database
- Update/Rollback Config: Configure rolling updates
- Resource Limits: Set hard limits with ulimits
Security Best Practices
Recommendations
- Use strong passwords: Generate random passwords for production databases
- Limit external access: Only expose databases externally when required
- Regular backups: Configure automated backups to protect your data
- Resource limits: Set appropriate limits to prevent resource exhaustion
- Monitor logs: Check container logs regularly for errors or security issues
Next Steps
Database Backups
Set up automated backups and restore procedures
PostgreSQL Setup
Deploy your first PostgreSQL database