Skip to main content

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.

Dokploy supports five managed database types — PostgreSQL, MySQL, MariaDB, MongoDB, and Redis. Each database follows the same lifecycle pattern: create, configure, deploy, start/stop, and remove. Databases can expose an external port for direct access and accept environment-variable overrides. All database endpoints follow the pattern /<type>.<action>.

Endpoint Summary

MethodEndpointDescription
POST/postgres.createCreate a PostgreSQL database
GET/postgres.oneFetch a PostgreSQL database
POST/postgres.startStart the database container
POST/postgres.stopStop the database container
POST/postgres.deployDeploy (provision) the database
POST/postgres.removeDelete the database
POST/postgres.saveEnvironmentSet environment variables
POST/postgres.saveExternalPortExpose an external port
POST/postgres.updateUpdate database configuration
POST/postgres.rebuildRebuild the database container
POST/postgres.reloadReload the database service
POST/postgres.moveMove to another environment
GET/postgres.searchSearch PostgreSQL databases
POST/mysql.createCreate a MySQL database
GET/mysql.oneFetch a MySQL database
POST/mysql.startStart the database container
POST/mysql.stopStop the database container
POST/mysql.deployDeploy the database
POST/mysql.removeDelete the database
POST/mysql.saveEnvironmentSet environment variables
POST/mysql.saveExternalPortExpose an external port
POST/mysql.updateUpdate database configuration
POST/mysql.rebuildRebuild the container
POST/mysql.reloadReload the database service
POST/mysql.moveMove to another environment
GET/mysql.searchSearch MySQL databases
POST/mariadb.createCreate a MariaDB database
GET/mariadb.oneFetch a MariaDB database
POST/mariadb.deployDeploy the database
POST/mariadb.startStart the container
POST/mariadb.stopStop the container
POST/mariadb.removeDelete the database
POST/mariadb.saveEnvironmentSet environment variables
POST/mariadb.saveExternalPortExpose an external port
POST/mariadb.updateUpdate configuration
POST/mariadb.rebuildRebuild the container
POST/mariadb.reloadReload the database service
POST/mariadb.moveMove to another environment
GET/mariadb.searchSearch MariaDB databases
POST/mongo.createCreate a MongoDB database
GET/mongo.oneFetch a MongoDB database
POST/mongo.deployDeploy the database
POST/mongo.startStart the container
POST/mongo.stopStop the container
POST/mongo.removeDelete the database
POST/mongo.saveEnvironmentSet environment variables
POST/mongo.saveExternalPortExpose an external port
POST/mongo.updateUpdate configuration
POST/mongo.rebuildRebuild the container
POST/mongo.reloadReload the database service
POST/mongo.moveMove to another environment
GET/mongo.searchSearch MongoDB databases
POST/redis.createCreate a Redis instance
GET/redis.oneFetch a Redis instance
POST/redis.deployDeploy the instance
POST/redis.startStart the container
POST/redis.stopStop the container
POST/redis.removeDelete the instance
POST/redis.saveEnvironmentSet environment variables
POST/redis.saveExternalPortExpose an external port
POST/redis.updateUpdate configuration
POST/redis.rebuildRebuild the container
POST/redis.reloadReload the Redis service
POST/redis.moveMove to another environment
GET/redis.searchSearch Redis instances

Key Endpoints

Create a Database

All database types share the same creation pattern. Supply a name, the target environmentId, and optionally a serverId.
name
string
required
Display name for the database.
environmentId
string
required
Target environment ID.
databasePassword
string
Initial superuser password. Auto-generated if omitted.
databaseName
string
Initial database name (default: postgres).
databaseUser
string
Initial superuser username (default: postgres).
dockerImage
string
Docker image to use (e.g., postgres:16).
curl -X POST 'https://your-instance.com/api/postgres.create' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "my-postgres",
    "environmentId": "env_abc123",
    "databasePassword": "s3cur3p4ss",
    "databaseName": "appdb",
    "dockerImage": "postgres:16"
  }'

Deploy a Database

After creation, call the deploy endpoint to start the container.
postgresId / mysqlId / mongoId / redisId / mariadbId
string
required
ID of the database resource to deploy (field name varies by type).
curl -X POST 'https://your-instance.com/api/postgres.deploy' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "postgresId": "pg_abc123" }'

Save External Port

Expose a database port on the host so external tools (e.g., database clients) can connect directly.
postgresId
string
required
ID of the PostgreSQL database.
externalPort
number | null
required
Host port to expose (e.g., 5433). Pass null to remove the external port.
curl -X POST 'https://your-instance.com/api/postgres.saveExternalPort' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "postgresId": "pg_abc123",
    "externalPort": 5433
  }'

Notes

Removing a database (/postgres.remove, /mysql.remove, etc.) permanently deletes the container and its data volume. Always take a backup first.
Use saveExternalPort only when you need external tool access (e.g., a GUI client). For application-to-database communication within Dokploy, use the internal Docker network hostname.

Build docs developers (and LLMs) love