Core
Remote nodes & build placement
The complete upstream guide to remote nodes & build placement, synchronized with the product repository.
Product v0.22.0 · Complete source guide
Remote nodes
For the next release's opt-in HTTP/TCP readiness, node resource history, log drains, container inspection/file tools and availability view, see Node operations.
A node is another host that runs the NineDeploy agent: the same image as the panel, started with NINEDEPLOY_AGENT=1. The panel drives it through typed operations over an encrypted ("sealed") transport. A docker or compose service with a serverId deploys to that node, and each node runs its own Traefik proxy for the services on it.
From 0.15.2 a node can do almost everything the panel host does: Nixpacks and Railpack builds, private clones with a PAT or deploy key, volumes, managed databases (0.15.3), builds on another host with image transfer (0.15.3), and Docker Swarm (0.15.4). Every one of these is opt-in, and every one needs a node agent recent enough to offer it. Until you update a node's agent, that node behaves exactly as before.
1. Enrolling a node
Manual registration (Servers → Add node, POST /v1/servers {name, host, port}, operator only). The panel generates the agent token, keeps it encrypted, and answers once with token, tokenSha256 and agentCommand: the docker run line to paste on the node. That line starts ghcr.io/ninedeploy/ninedeploy:v<panel version> as ninedeploy-agent, as root, with the Docker socket, /var/lib/ninedeploy-agent mounted at the same path, and NINEDEPLOY_AGENT_TOKEN=<sha256 of the token>. The agent never holds the raw token. Then Test (POST /v1/servers/:id/test) marks the node online.
SSH bootstrap (POST /v1/servers/ssh-bootstrap) installs Docker if asked, runs the same command over SSH with a fresh token, and registers the node. How Docker is installed depends on the node (G4.1):
- RHEL, CentOS, Rocky, Alma and Oracle Linux: Docker Inc.'s signed RPM repository.
get.docker.comrefuses Rocky and Alma. - Alpine: its own
dockerpackage, enabled with OpenRC. - openSUSE Leap, Tumbleweed and SLES: the distribution's
docker,docker-composeanddocker-buildxpackages, enabled with systemd. On SLES these come from the Containers Module, which must be active (SUSEConnect -p sle-module-containers/...). - Arch, Manjaro and EndeavourOS: the same three packages from Arch's own repository. Nothing else is upgraded, so a stale package database needs
pacman -Syufirst. - Debian, Ubuntu, Fedora and anything else:
get.docker.com, as before.
A non-root SSH user needs passwordless sudo.
A node on a tailnet (ROADMAP item 11). SSH bootstrap can join the node to a Tailscale tailnet first: tick Join a Tailscale tailnet and give an auth key (privateNetwork: {provider: 'tailscale', authKey, hostname?, loginServer?} over the API). For a Headscale control server, set its https URL as the login server. The panel then:
- installs Tailscale from
tailscale.com/install.shif it is missing, and startstailscaled; - runs
tailscale up --reset --accept-dns=falsewith the key. The key reaches the node on the SSH session's stdin and is read by Tailscale from a 0600 file that is deleted straight after. It is never in an argument list, a log or the database. The node's DNS is left alone, so containers keep its resolver; - publishes the agent on the node's tailnet IPv4 address only (
-p 100.x.y.z:4600:4600), and registers the node under that address; - sets
net.ipv4.ip_nonlocal_bind = 1(/etc/sysctl.d/90-ninedeploy-agent-bind.conf). After a reboot, Docker can then publish the agent beforetailscaledhas brought the address up.
The panel host must be on the same tailnet, and the tailnet's access rules must let it reach the agent port. If the panel cannot reach the agent there, the bootstrap stops and says so. Use a pre-approved auth key: a key that needs approval leaves the node waiting. The cloud nodes (Hetzner, DigitalOcean, Vultr) do not offer this: their user data is readable from inside the VM, so an auth key placed there would not stay secret. Join such a node to the tailnet yourself and register it by its tailnet address. For Swarm, use the tailnet address as the node's advertise address, so the join check in section 8 matches it.
Self-enrolment: start the agent with NINEDEPLOY_MASTER_URL and NINEDEPLOY_ENROLMENT_TOKEN instead of a token hash. It announces itself every 60 seconds and waits for an operator to approve it. See .env.example for the agent's variables.
Register a node by IP address where you can. Swarm's join check compares the node's address with the server's host (section 8), and a hostname makes that check depend on DNS.
Keep the transport between the panel and its nodes on a private network or VPN. Operations are sealed (AES-256-GCM under a key derived from the token), and every feature that carries a secret refuses an unsealed transport, but there is no TLS underneath.
2. Agent versions and updates
Nodes update separately from the panel. The panel learns what an agent can do from its sealed agent.ping answer: the version and a list of capabilities. GET /v1/servers shows them per node:
agent: {version, capabilities, checkedAt}, ornulluntil a sealed ping answered;features: {nixpacks, railpack, privateClones, volumes, databases, imageTransfer, swarm}, with areasonnaming the agent version to install when something is off;terminal,isBuildServer,buildConcurrency,databases(how many managed databases the node hosts),swarmNodeIdandswarmRole.
The panel keeps the last answer in memory for up to 5 minutes, so after an agent update GET /v1/servers can show the previous version for that long. Test stores the new answer for a node that shows agent: null. The list is advisory: a deploy asks the agent again when it runs.
A newer agent under an older panel changes nothing. The 0.15.x agents keep every older operation byte-identical, so you can update agents before or after the panel, and keep a newer agent if you roll the panel back.
To update an agent:
- re-run the node's bootstrap from the Servers page: it replaces
ninedeploy-agentwith the panel's version, under a new token. The new container gets only the default variables, so set your switches (section 3) again; or - on the node,
docker pull ghcr.io/ninedeploy/ninedeploy:v<version>, thendocker rm -f ninedeploy-agentand run the samedocker runline with the new tag, the sameNINEDEPLOY_AGENT_TOKENand your switches.docker inspect ninedeploy-agent --format '{{range .Config.Env}}{{println .}}{{end}}'shows the current values before you remove it.
3. Capabilities, switches and refusals
| Feature | Capabilities | First agent | Node switch (on the agent) |
|---|---|---|---|
| Service and host terminals | terminal, terminal.host | 0.15.0 | NINEDEPLOY_AGENT_HOST_TERMINAL=off (host shells only) |
| GitHub App repositories | git.credential | 0.13.0 | — |
| Volume attachments, a container command, the Docker socket | docker.runSpec (+ volume.manage for volumes) | 0.15.2 | NINEDEPLOY_AGENT_DOCKER_SOCKET=off refuses socket mounts only |
| Node volumes: create, list, back up, restore | volume.manage, stream | 0.15.2 | — |
| Image transfer (build placement, fan-out) | stream, image.manage | 0.15.2 | — |
| Nixpacks builds | build.nixpacks | 0.15.2 | NINEDEPLOY_AGENT_BUILDS=off |
| Railpack builds | build.railpack | 0.15.2 | NINEDEPLOY_AGENT_BUILDS=off |
A Dockerfile build stage and build arguments (docker.buildWith; values only inside a sealed request) | docker.buildOptions | 0.18.10 | NINEDEPLOY_AGENT_BUILDS=off. Without it a stage is refused and build arguments are left out, as before |
| PAT and deploy-key clones | git.sshkey | 0.15.2 | NINEDEPLOY_AGENT_STATIC_CREDENTIALS=off |
| Managed databases | db.manage, stream, docker.runSpec, volume.manage | 0.15.3 | NINEDEPLOY_AGENT_DATABASES=off |
| Database client terminals | db.manage, db.client, sealed terminal transport | 0.18.2 | NINEDEPLOY_AGENT_DATABASES=off or NINEDEPLOY_AGENT_DATABASE_CLIENTS=off |
| Swarm join and leave | swarm | 0.15.4 | opt-in: NINEDEPLOY_AGENT_SWARM_MANAGER=<host:port> |
| Port mappings (UDP, port ranges, a host IP) | docker.runSpec + docker.ports | 0.16.1 | — (the agent refuses 22, 80, 443 and its own port) |
| Custom Docker labels | docker.runSpec + docker.userLabels | 0.16.4 | — (the agent refuses ninedeploy.*, com.docker.*, traefik.*) |
| Command healthcheck (as the container's Docker healthcheck) | docker.runSpec + docker.healthCmd | 0.16.4 | — |
| File mounts (Service → Volumes → Files) | docker.runSpec + docker.fileMounts | 0.16.5 | — (only files the agent wrote under .agent-files/ are mounted, read-only) |
| Container options (GPUs, shared memory, init, ulimit, capabilities) | docker.runSpec + docker.runtimeOptions | 0.16.6 | NINEDEPLOY_AGENT_RUNTIME_OPTIONS=off. Not a refusal: without it the container starts without them, as before, and the log says why |
| OS security updates (read pending updates, automatic security updates on/off) | host.packages | 0.18.6 | NINEDEPLOY_AGENT_HOST_PACKAGES=off |
| ClickHouse, Meilisearch and RabbitMQ backups and restores of node databases | db.manage + db.dump.extra | 0.18.7 | NINEDEPLOY_AGENT_DATABASES=off |
A preview copy of a MySQL or MariaDB database that runs on a node (DEPLOYMENTS.md, "A database copy per preview": the application database alone over the db.dump stream) | db.manage, stream + db.dump.scope, sealed transport | 0.22.0 | NINEDEPLOY_AGENT_DATABASES=off |
| Major version upgrades of node databases (DATABASES_BACKUPS.md §12, "On a node"; the panel keeps the journal, the agent runs each step) | db.manage, stream + db.upgrade, sealed transport | 0.21.0 | NINEDEPLOY_AGENT_DATABASES=off |
| Standby replicas of node PostgreSQL databases (DATABASES_BACKUPS.md §13, "On a node"; the panel keeps the journal, the agent runs each step) | db.manage, stream, docker.runSpec, volume.manage, db.pitr.archive + db.standby, sealed transport | 0.21.0; 0.21.1 for the standby to stream from the primary | NINEDEPLOY_AGENT_DATABASES=off or NINEDEPLOY_AGENT_PITR=off |
| Trivy image scans of node services (scheduled and on request) | image.scan | 0.18.7 | NINEDEPLOY_AGENT_IMAGE_SCAN=off |
Moving a compose stack with its volumes (list, create and transfer ndcmp-<slug>_<key>) | volume.compose | 0.18.7 | NINEDEPLOY_AGENT_VOLUME_COMPOSE=off |
| GitHub Actions just-in-time runners on the node (GITHUB_APP.md §7.1) | gha.runner | 0.18.7 | opt-in: NINEDEPLOY_AGENT_GHA_RUNNERS=on; off or unset turns it off |
ninedeploy tunnel service / tunnel db to a service or database on the node (sealed tunnel.open, encrypted /agent/tunnel) | tunnel.tcp | 0.18.7 | NINEDEPLOY_AGENT_TUNNELS=off |
Maintenance mode and custom error pages for node services, served by the node's page server ninedeploy-pages (TRAEFIK_INGRESS.md) | proxy.pages | 0.18.27 | NINEDEPLOY_AGENT_NODE_PAGES=off, or NINEDEPLOY_AGENT_CONTAINER_MUTATIONS=off |
| Pre-deploy and post-deploy hooks of node services, in a one-off container from the release image (DEPLOYMENTS.md) | docker.hooks | 0.18.27 | NINEDEPLOY_AGENT_DEPLOY_HOOKS=off, or NINEDEPLOY_AGENT_CONTAINER_MUTATIONS=off |
A switch counts as off when it is off, false, 0, no or disabled. Switching a feature off removes its capability from the ping, and the agent refuses the operation too.
What the panel answers when a node cannot do something (the agent is asked nothing but agent.ping, and nothing is written):
| Answer | When |
|---|---|
422 node_agent_outdated | The agent predates the feature. The message names the version to install. |
403 node_feature_disabled | A current agent whose owner switched the feature off. The message names the variable. |
422 node_swarm_not_enabled | Swarm join on a current agent without NINEDEPLOY_AGENT_SWARM_MANAGER. The message names the value to set. |
422 node_transport_unsealed | The panel reaches the node only unencrypted, and the feature carries a secret. |
502 node_unreachable | The agent did not answer. |
The same check runs again when the deployment starts, so a node downgraded in between fails the deploy with the same message.
4. Builds on a node
The panel resolves the build pack on its own checkout of the commit, with the panel host's rules: a Dockerfile at the configured path, else a Dockerfile found in the repository, else Nixpacks. The node builds what the panel chose.
- Nixpacks builds run
nixpacks buildon the node. The service's build-time env is on thenixpackscommand line on the node, as it is on the panel host. - Railpack builds run
railpack prepare, thendocker buildx buildwith Railpack's frontend (ghcr.io/railwayapp/railpack-frontend:v<bundled version>, pulled on first use) on the node's own BuildKit. Env values reach the build as BuildKit secrets, never on a command line. If the node has its own BuildKit, setNINEDEPLOY_AGENT_BUILDKIT_HOST(for exampletcp://buildkitd:1234) and the agent runsrailpack buildagainst it instead. - Railpack through the node's own Docker needs Docker's containerd image store. Railpack's frontend uses BuildKit merge operations, which Docker's built-in BuildKit offers only with that store.
docker infoshowsdriver-type: io.containerd.snapshotter.v1under the storage driver when it is on; a daemon on the classic store (overlay2) does not. From agent v0.15.5 such a build stops before anything is built, with the fixes in the deploy log (agents v0.15.2–v0.15.4 fail later withrequested experimental feature mergeop has been disabled on the build server). Pick one:- turn the containerd image store on: add
"features": {"containerd-snapshotter": true}to/etc/docker/daemon.jsonand restart Docker. While it is on, the images and containers of the classic store are not visible to Docker (they come back when you turn it off), so plan it like a migration, and redeploy the node's services afterwards; - or set
NINEDEPLOY_AGENT_BUILDKIT_HOSTon the agent to a BuildKit daemon, for exampledocker run -d --name buildkitd --restart unless-stopped --privileged moby/buildkiton the node andNINEDEPLOY_AGENT_BUILDKIT_HOST=docker-container://buildkitd; - or build the service elsewhere: Build on: panel, or a build server whose Docker uses the containerd image store (section 5).
- turn the containerd image store on: add
- Agents before 0.15.2 keep the old rules: Nixpacks is refused (422), and a Railpack service builds the repository's Dockerfile instead. After the agent update such a service really builds with Railpack, which changes the image.
- The static pack runs its build commands on the host itself and is refused on a node. Build it on the panel (section 5).
- The first Nixpacks or Railpack build on a node pulls large base images.
5. Build placement and image transfer (0.15.3)
Where a docker service built from a repository (or, 0.16.7, from uploaded source: panel only) is built (PUT /v1/services/:id/placement, operator; GET for anyone who can see the service; Service → Settings → Build):
buildOn | Builds | Then |
|---|---|---|
null / target | where the service runs (the default, unchanged); 0.16.5: a null node service with Git LFS on builds on the panel, as panel; 0.16.7: so does one built from uploaded source | — |
panel | on the panel host, with every pack and credential the panel supports | the image is shipped to the node |
server + buildServerId | on a node with the build-server role | the image is shipped to where the service runs, the panel host included |
- Build-server role:
PATCH /v1/servers/:id {isBuildServer, buildConcurrency}(operator; concurrency 1–8, default 1). Turning it off does not change the services that build there: their next deploy fails, and never builds somewhere else. A deploy waiting for a build slot says so in its log, with how many builds are ahead. - Transfer: by default the panel relays the image over the sealed stream channel:
docker saveon the build host, verified by size and sha256 on both ends, loaded on the target underninedeploy/<slug>:<sha7>-b<deployment id>. The loaded image's id must match the build, and an archive carrying any other tag is refused. A failed transfer is retried once. Node-to-node transfers pass through the panel, so big images or many targets cost panel bandwidth. Each transfer is recorded (GET /v1/services/:id/image-transfers,GET /v1/deployments/:id/image-transfers). - Registry (opt-in per service): set
pushRegistrySourceId(a registry source) andpushRepository; the build host pushes, and targets pull by digest.- Nixpacks images keep their build environment. Nixpacks has no way to take secrets other than as
--envvalues, and it bakes them into the image config. From 0.15.6 a Nixpacks build is therefore refused when it would be pushed to a registry while the service has secret variables, attached-database credentials or vault references; the error names the variables. Switch the service to a Dockerfile or Railpack, remove those variables from the build, or clear the push registry. The same copy exists on a build server: a Nixpacks build there leaves an image with its build environment on that server until the next deploy replaces it. Dockerfile builds take no service environment into the image, and Railpack builds through the node's own Docker (the default) pass it as BuildKit secrets, which the smoke checks are not in the image history. Railpack withNINEDEPLOY_AGENT_BUILDKIT_HOSTset, and Railpack on the panel host, pass values with--env. A real build against a standalone BuildKit (Railpack 0.39.0, a canary value) left the value out of the image config, the history and every layer, so these builds are safe to push.
- Nixpacks images keep their build environment. Nixpacks has no way to take secrets other than as
- Retention: a build node keeps the current build of each service and removes the previous one. The panel keeps its own prune rules.
- Recommended for private repositories: with
buildOn: panel, a PAT or deploy key never leaves the panel. - Fan-out targets (
PATCH /v1/services/:id/targets) receive the primary's image when the primary was built with Nixpacks, Railpack, the static pack or on another host, instead of a different build. A target that needs a command, the Docker socket or volumes needs agent 0.15.2. Deploy hooks run once, on the panel, for the primary.
6. Private clones on a node
A PAT or deploy key reaches a node only when its source allows it:
- Allow it on nodes: System → Sources → Allow on nodes, or
PATCH /v1/sources/:id {allowOnNodes: true, password}. Turning it on needs an interactive session and your password; it is auditedsource.allow_on_nodes. It is off for every existing source. - The node needs agent 0.15.2 (
git.sshkey) over the sealed transport, and its owner can refuse every static credential withNINEDEPLOY_AGENT_STATIC_CREDENTIALS=off.
Without the toggle the deploy answers 400 remote_deploy_unsupported, naming both fixes. Per clone:
- A PAT travels like a GitHub App token: in the git child's environment as an
http.extraheader, never on a command line or in.git/config, and redacted from the output. The user name isoauth2for GitLab andx-access-tokenotherwise. - A deploy key is written to a fresh directory under
/dev/shmin the agent container (0700, key 0600) for that one call and removed afterwards, also on failure. Host keys are accepted on first use (accept-new) into a known_hosts file of that call; nothing is pinned across deploys. - A source that names its provider (github, gitlab, bitbucket, or a base URL) is never sent to a repository on another host.
customsources name no host. - While the clone runs, the credential is on the node. A PAT is not revoked afterwards, unlike a GitHub App token. If that matters, build on the panel instead (section 5).
GitHub App repositories work on nodes since 0.13 without any toggle: GITHUB_APP.md §6.
7. Volumes and databases on a node
Volumes live on the host of the service that uses them. 0.18.2 adds selected-node file browsing through an explicit host namespace and sealed capability; see Node volume files. Attachments, a container command and the Docker socket work for node docker services, missing managed volumes are created on the node first, and the volume routes take ?serverId=. Details, backups and restore: DATABASES_BACKUPS.md, "Volumes on nodes".
Managed databases can be placed on a node at create time (serverId, operator only, fixed for the database's life). Details: DATABASES_BACKUPS.md, "Databases on nodes". In short:
- each one runs as
nd-db-<slug>on its ownnd-dbnet-<slug>network on the node; services on the same node that attach it are connected to that network at deploy; - backups, policies, off-site upload, restore, drills, imports and shell terminals work; the dump files land on the panel;
- refused: attaching it to a service on another host (
409 attachment_host_mismatch), fan-out targets of a service that uses it (409 fanout_database_host), adopting an existing volume, and moving it to another host. Published 0.17.1 also refuses a client-mode terminal (422 client_mode_unsupported); 0.18.2 adds sealed node database client terminals; - public access (TLS end to end only, agent 0.18.11 or newer) and PgBouncer (agent 0.18.12 or newer) work on a node (NODE_OPERATIONS.md);
- a node that hosts databases cannot be deleted, even with
?force=true(409 server_hosts_databases).
8. Swarm (0.15.4)
Swarm is opt-in on both sides: an operator initialises and enables it on the panel host, which is the only manager, and each node's owner allows its node to join by setting NINEDEPLOY_AGENT_SWARM_MANAGER=<the panel's advertise address>:2377 on the agent. The agent then joins that manager only. It refuses to join while NINEDEPLOY_AGENT_DOCKER_SOCKET=off. The full procedure, what runs on Swarm and what is refused: DEPLOYMENTS.md §7.
Firewall, between all swarm hosts and only those:
| Port | Purpose |
|---|---|
| 2377/tcp | cluster management (the panel host) |
| 7946/tcp and 7946/udp | node gossip |
| 4789/udp | overlay traffic (VXLAN) |
| ESP (IP protocol 50) | the overlay encryption (IPsec) |
NineDeploy's overlays are always encrypted, so encrypted overlays must work on every swarm host: they do not on Windows nodes, and some desktop VMs lack the kernel support. POST /v1/swarm/init and every join check this first and answer 502 swarm_overlay_unavailable when the panel host cannot create one.
9. Troubleshooting
422 node_agent_outdated: update the agent (section 2). The message, andfeatures.reasoninGET /v1/servers, name the version.403 node_feature_disabled: the node's owner switched the feature off (the message names the variable). Change it on the agent and restart the agent.422 node_transport_unsealed: the agent does not offer the sealed transport and the panel allows cleartext (NINEDEPLOY_AGENT_ALLOW_CLEARTEXT=1). Update the agent.- Node shows
agent: null: no sealed ping has answered since the panel was upgraded. Click Test. 400 remote_deploy_unsupportednaming "Allow on nodes": the service clones with a PAT or deploy key. Allow the source on nodes, or set Build on: panel.- A Railpack build on a node fails pulling the frontend: the node needs to reach
ghcr.io, or setNINEDEPLOY_AGENT_BUILDKIT_HOSTto a BuildKit the node can use. - A Railpack build on a node says the daemon uses the classic image store (or, with an older agent,
mergeop has been disabled on the build server): the node's Docker needs the containerd image store, a BuildKit of its own, or the build moves to the panel or a build server (section 4). - A transfer fails with "exceeded its … byte limit": streams are capped at 50 GiB by default; raise
NINEDEPLOY_STREAM_MAX_BYTESon the panel. A stream also ends after 6 hours, and an agent runs at most 4 streams at once. 502 swarm_overlay_unavailable: the panel host's kernel cannot do IPsec for encrypted overlays (section 8).- Swarm join answers
swarm_node_unverified: the manager saw the node connect from another address than the server's host. Register the node by the IP address it uses to reach the panel host.
10. Rolling back and testing
What each 0.15.x rollback does to nodes, and the cleanup commands: ROLLBACK.md, "0.15.x multi-node rollback runbook".
node scripts/smoke-multinode.mjs runs a panel and a node (two Docker-in-Docker hosts and an agent) on throwaway containers: --image=<candidate> exercises every feature above; --from=v0.15.1 --to=<tag> --to-image=<image> upgrades a panel with an old agent and then updates the agent; --from=<tag> --from-image=<image> --to=v0.15.1 rehearses the rollback. --with-builds adds Nixpacks and Railpack builds; --no-swarm skips Swarm on hosts without IPsec.
For 0.18.2, Swarm preloading uses three bounded image slots per service rather than overwriting the serving generation's eligibility label. Current and rollback references across the manager are protected, and the legacy label survives an upgrade. Incomplete placement inventory stops preparation without changing eligibility. See Swarm preload safety.
0.18.2 implements sealed node Web Studio for the supported SQL/KV engines; see node Studio operations. Its full acceptance is tracked separately from published 0.17.1.
Creating nodes on Hetzner Cloud (G4.3)
Servers → Hetzner Cloud creates a VM that joins the panel by itself. Operators only.
Set up
- In the Hetzner Cloud Console, create a project API token with Read & Write.
- Paste it on the Servers page. The panel checks it with a read call first, then stores it encrypted. The page shows only its last four characters; Forget token removes it.
Create a server
- Pick a location, a server type and an image.
- Only the server types offered in that location are listed.
- Only images for that type's architecture are listed.
- Images: Ubuntu, Debian, Rocky, Alma, CentOS Stream and Fedora.
- Optionally pick SSH keys from the project for root.
The panel then:
- creates the VM with the label
managed-by=ninedeploy; - registers it as an
offlinenode with a fresh agent token.
The VM's cloud-init user data does two things:
- installs Docker the same way the SSH bootstrap does (signed repositories per distribution);
- starts the NineDeploy agent on port 4600.
The panel pings the new agent every 15 seconds for up to 20 minutes, and marks the node online when it answers. If the panel restarts in between, press Test on the node once the VM has booted.
Hetzner bills the server from the moment it is created.
Delete a server
Delete destroys the VM and removes the node.
- It is refused while the node hosts services, fan-out targets or managed databases, or is a Swarm member, with the same messages as deleting a node.
- A VM that is already gone on Hetzner only cleans up the panel side.
- Deleting the node from the Servers list instead leaves the VM running. The Hetzner card then shows
node: removed, and Delete there removes the VM.
What to know
- The first agent key's hash is in the VM's user data. Hetzner keeps the user data and serves it to the VM's metadata endpoint, which any container on the node can reach. So right after the agent first answers, the panel rekeys it with
agent.rekey(agent 0.18.6): the new hash is written to.agent-token-sha256in the agent's volume, the agent restarts with it, and the hash in the metadata no longer opens anything. The node counts as online only after that. Until then the Hetzner card shows it as rekeying, the node's Test and Approve are refused, and the agent itself (started withNINEDEPLOY_AGENT_REKEY_REQUIRED=1) runs nothing butagent.pingandagent.rekey. The new key is stored (encrypted) before the agent hears of it and is never replaced while pending, only sent again, so a rekey cut short by a panel restart never locks the panel out; a sweep every 2 minutes finishes it. The file also records whichNINEDEPLOY_AGENT_TOKENit replaced: an agent re-run with a different token uses that token. - Hetzner gives the VM no firewall. Like any node, the agent port accepts only sealed, token-authenticated requests.
- No migration:
- the token is the encrypted setting
hetzner_cloud_token_encrypted; - each node's link to its VM is the setting
cloud_server:<serverId>.
- the token is the encrypted setting
Routes (operator only), all audited (cloud.*):
GET /v1/cloud/hetznerPUTandDELETE /v1/cloud/hetzner/tokenGET /v1/cloud/hetzner/optionsGETandPOST /v1/cloud/hetzner/serversDELETE /v1/cloud/hetzner/servers/:serverId
Creating nodes on DigitalOcean (G4.3)
Servers → DigitalOcean creates a droplet that joins the panel by itself, the same way as a Hetzner VM. Operators only.
- In the DigitalOcean control panel, create a personal access token with read and write on droplets (and read on regions, sizes, images and SSH keys).
- Paste it into the card. The panel checks it with a read call, stores it encrypted, and shows back only its last four characters.
- Choose a name, a region, a size and an image, and optionally SSH keys for root. Sizes and images are filtered to the region. Only the distributions the bootstrap supports are offered: Ubuntu, Debian, Fedora, Rocky, AlmaLinux and CentOS.
What happens then:
- The droplet is created with the tag
ninedeployand the same user data as a Hetzner VM: Docker for its distribution, then the agent on the chosen port (default 4600). - A droplet has no address when DigitalOcean answers the create call. The panel reads it back for up to two minutes; a droplet that gets no public IPv4 in that time is deleted again.
- The node is registered
offline, rekeyed as soon as its agent first answers, and turns online after that. DigitalOcean also serves the user data on the droplet's metadata endpoint, so the rekey matters here for the same reason.
DigitalOcean bills the droplet from the moment it is created. Deleting it from the card works like Hetzner's: refused while the node hosts anything, and a droplet already gone only cleans up the panel side.
- No migration: the token is the encrypted setting
digitalocean_token_encrypted, and the link is the samecloud_server:<serverId>row withprovider: "digitalocean". - Tested against a fake DigitalOcean API; not yet against a real account.
Routes (operator only), all audited (cloud.*):
GET /v1/cloud/digitaloceanPUTandDELETE /v1/cloud/digitalocean/tokenGET /v1/cloud/digitalocean/optionsGETandPOST /v1/cloud/digitalocean/serversDELETE /v1/cloud/digitalocean/servers/:serverId
SDK: cloud.digitalocean.*, the same methods as cloud.hetzner.
Creating nodes on Vultr (G4.3)
Servers → Vultr creates an instance that joins the panel by itself, the same way again. Operators only.
- In the Vultr control panel, under Account → API, enable the API and copy the key. Vultr's API access control lists the addresses allowed to use it: add the panel's public address there.
- Paste the key into the card. The panel checks it with a read call, stores it encrypted, and shows back only its last four characters.
- Choose a name, a region, a plan and an operating system, and optionally SSH keys for root. Plans are filtered to the region; GPU plans are not offered. Only x64 builds of the distributions the bootstrap supports are offered: Ubuntu, Debian, Fedora, Rocky Linux, AlmaLinux and CentOS.
What happens then:
- The instance is created with the tag
ninedeploy, the name as its label and hostname, and the same user data as a Hetzner VM (base64 encoded, as Vultr requires): Docker for its distribution, then the agent on the chosen port (default 4600). - Vultr answers the create call with the address
0.0.0.0. The panel reads the instance back for up to three minutes; one that gets no public IPv4 in that time is deleted again. - The node is registered
offline, rekeyed as soon as its agent first answers, and turns online after that. Vultr serves the user data on the instance's metadata endpoint too, so the rekey matters here for the same reason.
Vultr bills the instance from the moment it is created. Deleting it from the card works like the others: refused while the node hosts anything, and an instance already gone only cleans up the panel side.
- No migration: the key is the encrypted setting
vultr_token_encrypted, and the link is the samecloud_server:<serverId>row withprovider: "vultr". Vultr names instances by UUID, soproviderServerIdis a string for these nodes (a number for Hetzner and DigitalOcean). - Tested against a fake Vultr API built from Vultr's API client (govultr); not yet against a real account.
Routes (operator only), all audited (cloud.*):
GET /v1/cloud/vultrPUTandDELETE /v1/cloud/vultr/tokenGET /v1/cloud/vultr/optionsGETandPOST /v1/cloud/vultr/servers(the create body takesosId, a Vultr operating system id, andplan)DELETE /v1/cloud/vultr/servers/:serverId
SDK: cloud.vultr.*, the same methods as cloud.hetzner.
Source guide (installer links and live inventory counts are normalized for this site): docs/MULTI_NODE.md.