Remove or uninstall

Remove a server, its agent, or the Deplo installation safely.

Choose the action that matches what you want:

ActionWhat it does
Remove server in DeploRevokes trust. It does not uninstall anything on the host.
Run uninstall.sh --agent-onlyRemoves the agent and host-side state, but leaves the control plane alone.
Run uninstall.shRemoves Deplo itself from the host.

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

uninstall.sh does both host-side jobs. The dashboard's command uses --agent-only. On the control-plane host, that also removes Traefik, so the panel stops answering until you re-run install.sh.

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 or a container Deplo did not label. Full flag reference: uninstall.sh. If the panel is unreachable, download the script from https://deplo.build/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 copy that file first if you plan to reinstall on the same host with the same domains.

On the machine running the control plane that directory's traefik entry is a symlink into /opt/deplo, so removing it takes the link rather than the certificates behind it. There the certificates live with the rest of /opt/deplo.

Uninstall Deplo itself

Run the same script without --agent-only. It also removes /opt/deplo, the panel, its Postgres, its Traefik, and Deplo-managed containers on that host.

# 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.

Before you remove the host

  • 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.

Troubleshooting

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.

Next steps

Did this page help you?

On this page