Deplo

Remove or uninstall

Taking a machine out of the fleet, removing the agent, and removing Deplo itself are three different acts.


What it is

Three different acts, on purpose.


How it works

Removing a server in Deplo is trust revocation. The pinned certificate is cleared, and the control plane will never talk to that machine again. It does not reach in and uninstall anything, because at the moment you most need to remove a server, it is usually not answering.

Uninstalling is a command you run on the host. Deplo prints it for you.

The one exception is a migration source, which Deplo does uninstall itself from, because that role exists precisely to be temporary.


Remove a server from Deplo

Move or delete anything still running there

Removal does not do this for you.

Open the server's Advanced tab

Settings -> Servers, choose the server, then Advanced.

Remove the server

Click Remove server in the danger zone.

Copy the uninstall command

It's printed for you, if you want the host cleaned.

The machine running the control plane cannot remove itself.

Any pending teardowns for that server are dropped with it, so Deplo stops retrying instructions nobody can carry out.


Uninstall the agent from a host

One script does both jobs: uninstall.sh. --agent-only is what keeps it to the agent, and it is already in the command the dashboard prints for you. That printed command downloads the script first and runs it second (curl -fsSL .../uninstall.sh -o /tmp/deplo-uninstall.sh && sudo bash /tmp/deplo-uninstall.sh --yes --agent-only); the piped forms below do the same job when you type it yourself.

The script is a dry run by default. Running it with no flags 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-data

It never touches Docker Engine itself, and never touches a container Deplo did not label. It is safe on a machine that was never a Deplo host, and safe to run twice. Full flag reference, including exactly what --purge-data adds: uninstall.sh.

/var/lib/deplo-agent holds your issued certificates

Removing it takes Traefik's acme.json, and your certificates, with it. Let's Encrypt rate-limits reissuance, so if you plan to reinstall on the same host and the same domains, copy that file first.


Uninstall Deplo itself

Same script, without --agent-only. It removes the control plane in /opt/deplo as well: the panel, its Postgres, its Traefik, the agent on that machine, and every container Deplo deployed there.

# 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

Order matters, and the script handles it: the panel and its Postgres stop before Traefik and the deplo network go away under them.

--purge-data deletes DEPLO_SECRET

Copy /opt/deplo/.env first if you might ever want to restore a backup. Full warning: uninstall.sh.

--purge-backups is separate for the same reason: everything else on the machine can be rebuilt from a backup, and those are the backups.

Moving the instance rather than ending it? Take disaster recovery first and uninstall second.


Decommission a machine properly

Move the apps

To another server, or delete them.

Move or re-point any backup destination

If one lives on this machine.

Take a final backup

If anything there is not backed up elsewhere.

Run the uninstall command on the host

With --purge-data if the machine is being handed on.

Delete the machine

At your provider.

For the machine running the panel, steps 4 and 5 are one command: uninstall without --agent-only.


Limits and gotchas

  • Removing a server does not stop its containers. They keep running, unmanaged, until somebody stops them. That is why the uninstall step exists.
  • Apps still assigned to a removed server cannot deploy. Move them first.
  • Reinstalling an agent re-bootstraps from scratch. The installer deletes the existing certificate files, so it genuinely re-enrolls against the new pin rather than half-trusting the old one.
  • A migration source is removed with Remove from Deplo, and Deplo uninstalls its own agent from that machine as part of it.
  • The panel cannot uninstall itself. Nothing in the dashboard removes the control plane, it is the thing doing the removing. That is what the host-side script is for.
  • Docker Engine and /etc/docker/daemon.json stay. The installer widened Docker's address pools and kept your original as daemon.json.deplo-bak. Putting it back needs a Docker restart, which stops every container on the machine, so the uninstaller only tells you it is there.

If it does not work

If it does not work

The uninstall script does nothing (it is a dry run, add --yes), containers survive an uninstall, or a removed server reappears: see Servers and agents troubleshooting.


See also

Did this page help you?

On this page