Remove or uninstall
Remove a server, its agent, or the Deplo installation safely.
Three different acts:
| Action | What it does |
|---|---|
| Remove server in Deplo | Revokes trust and forgets the server. Nothing on the host is uninstalled. |
uninstall.sh --agent-only on the host | Removes the agent, its Traefik and the containers Deplo deployed there. The control plane stays. |
uninstall.sh on the host | Removes Deplo itself from that machine. |
The exception is a migration source: Remove from Deplo (Settings -> Migrations) also uninstalls its agent, because that role is meant to be temporary.
Remove a server from Deplo
Move or delete what runs there
Removal doesn't do it for you, and apps still assigned to a removed server can't deploy.
Remove the server
Settings -> Servers, the server, Advanced, then Remove server in the Danger zone.
Copy the uninstall command
Finish the cleanup on edge-2 shows it, to run on the host as root.
- Its containers keep running, unmanaged, until the uninstall command stops them.
- Pending teardowns for that server are dropped, so Deplo stops retrying what nobody can carry out.
- The machine Deplo runs on can't be removed.
Uninstall the agent from a host
The dashboard's command runs uninstall.sh --agent-only. It is a dry run by default: without
--yes it prints exactly what it would do and changes nothing.
# See what would happen
curl -fsSL https://deplo.example.com/uninstall.sh | sudo bash -s -- --agent-only
# Do it
curl -fsSL https://deplo.example.com/uninstall.sh | sudo bash -s -- --yes --agent-only
# Do it, and delete the data too
curl -fsSL https://deplo.example.com/uninstall.sh | sudo bash -s -- --yes --agent-only --purge-dataIf the panel is unreachable, the script is also at https://deplo.build/uninstall.sh. On the machine
Deplo runs on, --agent-only also removes the Traefik that serves the panel, so the panel stops
answering until you re-run install.sh.
/var/lib/deplo-agent holds your issued certificates
It goes with the agent, and Traefik's acme.json with it. Let's Encrypt rate-limits reissuance, so copy
that file first if you will reinstall on the same host with the same domains. (On the machine Deplo
runs on it is a symlink into /opt/deplo, and the certificates stay.)
Uninstall Deplo itself
The same script without --agent-only also stops the panel and its Postgres, before Traefik and the
deplo network go away under them.
# See what would happen
curl -fsSL https://deplo.example.com/uninstall.sh | sudo bash
# Do it, keeping every volume and /opt/deplo
curl -fsSL https://deplo.example.com/uninstall.sh | sudo bash -s -- --yes
# Do it, and delete the data with it
curl -fsSL https://deplo.example.com/uninstall.sh | sudo bash -s -- --yes --purge-data
# And the backups stored on this machine
curl -fsSL https://deplo.example.com/uninstall.sh | sudo bash -s -- --yes --purge-data --purge-backups--purge-data deletes DEPLO_SECRET
It deletes /opt/deplo, and .env with it. Copy /opt/deplo/.env first if you might ever restore a
backup. --purge-backups is a separate flag because those are the last copies.
What it never touches: Docker Engine, a container Deplo did not label, and /etc/docker/daemon.json.
The installer widened Docker's address pools there and kept your original as daemon.json.deplo-bak;
putting it back restarts Docker, which stops every container, so the uninstaller only says where it is.
Full flag reference: uninstall.sh. Moving the instance rather than ending it? Use Move Deplo first.
Decommission a machine properly
- Move its apps to another server, or delete them.
- Move or re-point any backup destination that lives on it.
- Take a final backup of anything not backed up elsewhere.
- Remove the server in Deplo.
- Run the uninstall command on the host, with
--purge-dataif the machine is handed on. - Delete the machine at your provider.
For the machine Deplo runs on, steps 4 and 5 are one command: uninstall.sh without --agent-only.
Nothing in the dashboard removes the control plane: it is the thing doing the removing.
Reinstalling an agent starts from scratch. The installer deletes the old certificate files and enrolls again, rather than half-trusting the old ones.
Troubleshooting
The script does nothing (it is a dry run, add --yes), containers survive an uninstall, or a removed
server reappears: see Servers and agents troubleshooting.
Next steps
Did this page help you?