Docker Manager

Migrations

Move a stack, a volume, a whole server or Docker Manager itself to another server.

Migrations move your stacks and their data to another server. Docker Manager checks the destination first, verifies every copy and deletes nothing on the old server until you say so.

You moveWhat comes along
A stackIts folder, its named volumes with their data, its history and settings, and the permissions set on the stack.
A volumeA copy of its data, under the same or a new name.
A whole serverEvery stack, group by group, and the networks they share.
Docker Manager itselfEverything in Docker Manager, plus every stack on its server.

Images from a registry are downloaded again on the new server, images with a build: section are built there, and other images are copied.

Migrate a stack

  1. Open the stack and choose More Stack Actions → Migrate.
  2. Destination: pick the environment and press Check Destination.
  3. Check: see what must be fixed first and what will be copied. Uncheck a volume that should start empty on the new server, and press Next.
  4. Confirm: check that the stack is unavailable during the migration and press Start Migration.

The stack stops, is copied and starts on the new server. If anything fails, it starts again on the old server.

Migrate a volume

  1. Open the volume and its Migrate tab.
  2. Pick the Destination Environment and, if you like, a Name on the Destination, and press Next.
  3. Review the Check and press Migrate Volume.

The original is not changed. If containers use the volume, stop them first, or check Copy While the Containers Keep Running for a live copy: files being written may be incomplete.

Migrate a whole server

Use this to move to a new server or to empty one before you retire it.

  1. Open the environment and choose More Actions → Migrate Environment.
  2. Destination: pick the new environment, uncheck stacks that should stay, and press Check Migration.
  3. Check: stacks that share a network or a volume, such as a reverse proxy and the stacks behind it, form a group that moves together. Press Next.
  4. Confirm: check that each group's stacks are unavailable while it moves, and press Start Migration.

Groups move one at a time; the rest keep running until their turn. If a stack can't be moved, fix the problem and press Migrate the Rest.

Move Docker Manager to a new server

Use this when you replace the server Docker Manager runs on; your other servers stay connected.

  1. Open Settings → General and press Move Docker Manager. Enter This Server's Address and New Server's Address (IP addresses or host names on your network, with a port if it isn't 8080) and press Create Setup Files.
  2. On the new server, save the compose.yaml and .env it shows in an empty folder and run docker compose up -d. Or paste the command under Or Paste This on the New Server. When both items under On the New Server show as done, press Next.
  3. On the Check step, read Before You Start and press Next. Then press Move Everything.
  4. When the page says Docker Manager Moved, point your Docker Manager address (and the addresses of your stacks) at the new server, and sign in.

The setup files contain a pairing code and are shown once. Keep them private. If you lose them, press Create New Setup Files.

Until Docker Manager has handed itself over, you can Cancel the Move; stacks that already moved stay on the new server. While your address still points at the old server, follow the move on the new server's status page at http://<new server's address>:8080 (or the port you entered). If the move stops there, see Troubleshooting.

After a move

The old copy stays on the old server, stopped. Check that everything works first, then remove it:

  • For one stack, press Remove From … when the migration finishes, or Start Again on … to run it there once more.
  • After a server migration, Remove Old Copies From … removes them all at once.

When a server is empty, you can archive it.

Good to know:

  • Folders a stack mounts from outside its own folder are not moved.
  • A server migration leaves Docker Manager's own stack, containers outside stacks and volumes no stack uses behind.
  • Volumes with a special driver, such as NFS, move without their data, and can't be migrated on their own.
  • Backups made before the move can be restored to the moved stack.
  • The Check estimates the downtime and the copy time from the speed of earlier migrations from the same server to the same destination. Until one has run, it assumes a speed and says so.
  • During a move of Docker Manager, the agents on the old and the new server connect over plain HTTP on your network. Once you sign in at your usual address on the new server, they switch to HTTPS and get new credentials by themselves. If an agent needs a hand, Move Complete says what to do.

On this page