The Servers API allows you to register remote Linux servers, validate SSH connectivity, install Dokploy dependencies (setup), and monitor resource metrics. SSH key management is built in — you can generate, store, and rotate keys that Dokploy uses to connect to remote machines. For cluster deployments, the API also exposes Swarm node management: add workers, promote managers, and drain or remove nodes.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.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /server.create | Register a new remote server |
| GET | /server.one | Fetch a server by ID |
| GET | /server.all | List all registered servers |
| GET | /server.count | Count total registered servers |
| POST | /server.setup | Install Dokploy agent on a server |
| POST | /server.validate | Test SSH connectivity to a server |
| POST | /server.security | Configure security settings |
| POST | /server.setupMonitoring | Install monitoring agent on the server |
| POST | /server.remove | Remove a registered server |
| POST | /server.update | Update server configuration |
| GET | /server.publicIp | Get the server’s public IP address |
| GET | /server.getServerTime | Get the current time on the server |
| GET | /server.getServerMetrics | Fetch CPU, memory, and disk metrics |
| GET | /server.buildServers | List servers available for builds |
| GET | /server.withSSHKey | List servers associated with an SSH key |
| GET | /server.getDefaultCommand | Get the setup command for bootstrapping |
| POST | /sshKey.create | Create an SSH key record |
| POST | /sshKey.remove | Delete an SSH key |
| GET | /sshKey.one | Fetch an SSH key by ID |
| GET | /sshKey.all | List all SSH keys |
| POST | /sshKey.generate | Generate a new SSH key pair |
| POST | /sshKey.update | Update an SSH key |
| GET | /cluster.getNodes | List all Swarm cluster nodes |
| POST | /cluster.addWorker | Join a server as a Swarm worker |
| POST | /cluster.addManager | Promote a server to Swarm manager |
| POST | /cluster.removeWorker | Drain and remove a worker from the cluster |
Key Endpoints
POST /server.create
Register a new remote server so Dokploy can deploy workloads on it.
Display name for the server.
IPv4 or IPv6 address of the remote server.
SSH port (default:
22).SSH username (e.g.,
root or ubuntu).ID of the SSH key to use for authentication.
Optional description.
Unique ID of the registered server.
Initial status:
idle, active, or error.POST /server.setup
Install the Dokploy agent and required Docker dependencies on a registered server. This must be run once before the server can host workloads.
ID of the server to set up.
POST /server.validate
Test the SSH connection and confirm the server is reachable before deploying workloads.
ID of the server to validate.
Whether the SSH connection succeeded.
Descriptive result message.
POST /sshKey.generate
Generate a new RSA or Ed25519 key pair and store it in Dokploy. Returns the public key to add to your server’s authorized_keys.
Display name for the key.
Optional description.
Unique ID of the generated key.
The public key string to add to your remote server.
GET /server.getServerMetrics
Retrieve real-time CPU, memory, and disk utilization for a server.
ID of the server to query.
CPU utilization data including usage percentage.
Memory usage including total, used, and free values.
Disk usage including total, used, and available values.
Notes
Run
server.setup after server.create to install Docker and the Dokploy agent. Without setup, deployments to that server will fail.