Dokploy CLI is a command-line tool to manage your Dokploy server remotely. It provides 449 commands auto-generated from the Dokploy OpenAPI spec, covering every API endpoint.
npm install -g @dokploy/cli
dokploy auth -u https://panel.dokploy.com -t YOUR_API_KEY
export DOKPLOY_URL="https://panel.dokploy.com" export DOKPLOY_API_KEY="YOUR_API_KEY"
Create a .env file in your working directory:
DOKPLOY_URL="https://panel.dokploy.com" DOKPLOY_API_KEY="YOUR_API_KEY"
The CLI loads it automatically. Shell environment variables take priority over the .env file.
Manage several Dokploy instances or organizations with named profiles. Profiles are stored in ~/.dokploy/config.json (override with DOKPLOY_CONFIG_DIR).
# Save credentials under a named profile dokploy auth --profile prod -u https://panel.dokploy.com -t PROD_API_KEY dokploy auth --profile staging -u https://staging.example.com -t STAGING_API_KEY # List profiles dokploy profiles list # * prod https://panel.dokploy.com # staging https://staging.example.com # Switch the active profile dokploy profiles use staging # Show the active profile dokploy profiles current # Remove a profile dokploy profiles remove prod
Override the active profile per-command with the global --profile flag or the DOKPLOY_PROFILE env var:
dokploy --profile prod project list DOKPLOY_PROFILE=staging dokploy project list
Without a --profile flag, credentials resolve in this order:
DOKPLOY_URL+DOKPLOY_API_KEY/DOKPLOY_AUTH_TOKENenv vars- The active profile (set with
dokploy profiles use, or the first profile saved) - The
defaultprofile
dokploy <group> <action> [options]
# List all projects dokploy project all # Get a specific project dokploy project one --projectId abc123 # Create an application dokploy application create --name "my-app" --environmentId env123 # Deploy an application dokploy application deploy --applicationId app123 # Create a postgres database dokploy postgres create --name "my-db" --environmentId env123 # Stop a database dokploy postgres stop --postgresId pg123 # Get raw JSON output dokploy project all --json
# List all groups dokploy --help # List actions in a group dokploy application --help # See options for a specific action dokploy application deploy --help
| Group | Commands | Group | Commands |
|---|---|---|---|
admin |
1 | notification |
38 |
ai |
9 | organization |
10 |
application |
29 | patch |
12 |
backup |
11 | port |
4 |
bitbucket |
7 | postgres |
14 |
certificates |
4 | preview-deployment |
4 |
cluster |
4 | project |
8 |
compose |
28 | redirects |
4 |
deployment |
8 | redis |
14 |
destination |
6 | registry |
7 |
docker |
7 | rollback |
2 |
domain |
9 | schedule |
6 |
environment |
7 | security |
4 |
gitea |
8 | server |
16 |
github |
6 | settings |
49 |
gitlab |
7 | ssh-key |
6 |
git-provider |
2 | sso |
10 |
license-key |
6 | stripe |
7 |
mariadb |
14 | swarm |
3 |
mongo |
14 | user |
18 |
mounts |
6 | volume-backups |
6 |
mysql |
14 |
# Install dependencies pnpm install # Run in dev mode pnpm run dev -- project all # Regenerate commands from OpenAPI spec pnpm run generate # Build pnpm run build # Lint & format pnpm run lint
Commands are auto-generated from openapi.json. To update:
- Replace
openapi.jsonwith the latest spec from the Dokploy repo - Run
pnpm run generate - Build with
pnpm run build
If you want to contribute to Dokploy CLI, please check out our Contributing Guide.
If you encounter any issues or have any questions, please open an issue in our GitHub repository.
This project is licensed under the MIT License.