Docker: Stack replication between appliances
Copy a Docker stack with its secrets and volume data between two Artica appliances, with backup and resumable transfers.
Back to Artica for Docker Edition
Move an application to another server, or promote your test site to production, in one operation.
Artica copies a whole Docker stack between two appliances: its compose files, its secrets and the content of its volumes.
The destination is backed up first and the transfer resumes after a network cut.
If anything fails, the destination gets its former content back.

What it does
Replication links two Artica appliances:
- The receiver lets other appliances copy the stacks it allows, or send stacks to it.
- The client connects to the receiver with a certificate issued by the receiver.
From the client you can:
- Pull a stack: the receiver builds an archive, the client downloads it and installs the stack locally.
- Push a stack: the client builds the archive and sends it, and the receiver installs it.
The archive holds the compose files, the stack settings, the secrets and one archive per volume.
Docker images do not travel.
The destination downloads them from their registry by digest, so it runs exactly the same images.
You start each operation by hand from the console.
One operation copies one stack.
Benefits
- Files, settings, encrypted secrets and volume data arrive together.
A WordPress or Dolibarr site keeps its database and its uploaded files. - The destination takes a backup of a stack before replacing it.
The last three backups are kept and restore in one click. - The archive moves in 2 MB pieces.
After a network cut, the transfer starts again from the last confirmed piece. - The destination checks everything before it touches the existing stack.
If the replacement fails, the backup is restored. - The replication certificate opens replication and nothing else.
The receiver decides which stacks clients may see and which networks may connect. - When the destination site has another address than the source, it keeps its own.
Use cases
- Migrate an application to a new appliance.
Pull the stack from the old server and tick Leave the source stopped, so that only the new server serves the site. - Promote pre-production to production.
Work on a copy of your site on a test appliance, then push it to production.
Production is backed up first and keeps its public address. - Refresh a test copy.
Pull the production stack onto the test appliance to work on fresh data.
Requirements
- Two Artica appliances with a recent Docker Manager.
The connection test shows the version and the archive format of the other appliance. - The client reaches the receiver on TCP port 9807.
- The images of the stack come from a registry the destination can reach.
An image built locally and found in no registry blocks the replication. - Enough free space on both sides for the archive and the volume data.
Set up the receiver
On the appliance that will receive connections:
- Open Docker > Status and the Replication (server) tab.
- In Receiver settings, turn on Receive stack replications.
- In Networks allowed to connect, list the networks of your client appliances, one per line, for example
192.168.1.0/24.
The default0.0.0.0/0covers every IPv4 client.
An IPv6 client needs its own network in the list. - Turn on Accept new stacks if clients may push a stack that does not exist here yet.
- In Client certificates, click Issue a certificate.
Issue one certificate per client appliance and protect it with a password.
Download the.p12file.
Never import the same certificate on two appliances.
A certificate identifies one client.

Then allow each stack that clients may copy:
- Open Docker > Stacks.
- Click Replication on the stack.
- Click Allow replication.

The Stacks open to replication tab of the receiver lists them.
Add the connection on the client
- Open Docker > Status and the Replication (client) tab.
- Open Connections and click Add a connection.
- Upload the
.p12file. - Give a Connection name, the Address of the other server and its Port (9807 by default).
- Type the Certificate password and click Add.
The password is not kept.

Click the test icon of the connection.
The answer shows the version of the other server, its archive format, its response time and whether it accepts new stacks.

Pull a stack
- Open Docker > Stacks on the client.
- Click Replicate stacks in the header.
- Search for a stack the other server allows.
- Click Pull.
- Read the confirmation and click Pull.
The confirmation names the source, the destination and the size to transfer.
When the stack already exists here, it warns that its whole content will be replaced after a backup.
Tick Leave the source stopped for a migration.

Push or synchronise a stack
- On the client, open the More menu of the stack and click Synchronise.
- Choose the connection.
- Click Push to send this stack, or Pull to bring the matching stack of the other server in place of this one.
- Confirm.
Pushing a stack that does not exist on the receiver needs Accept new stacks on the receiver.
During the transfer
The progress window names each step:
- Archive of the source.
- Transfer, with percentage and speed.
- Images downloaded on the destination.
- Backup of the destination.
- Replacement of the stack.
- Start and site address.
The source stack stops while its archive is built, so that its data is consistent.
It starts again after the copy, unless you asked to leave it stopped.
While a replication runs, the stack is locked on both sides.
Start, stop, edit, update and volume removal are refused until it ends.
Other stacks are not affected.
If the network cuts, the window shows the retry state and the next attempt.
The client retries for 15 minutes, then marks the operation interrupted.
To continue it, open the Transfers list of the Replication (client) tab and click Resume.
Backups and restore
Each replacement keeps a backup of the former content of the destination stack.
The last three backups per stack are kept.
- On the client, open Replication (client) > Backups and click Restore.
- A push replaces a stack on the receiver.
Its backup stays on the receiver and can be restored from the client.
If the Docker Manager stops in the middle of a replacement, it restores the former content at its next start.
The stack stays locked until then.
Security
- Clients reach the receiver only through Artica's certificate gateway on port 9807.
- The client trusts only the authority of the receiver it connects to, with no proxy and no redirection.
- Secrets travel encrypted with a key used for this transfer only.
They are never written in clear on disk or in a log. - Volume data travels as it is stored.
Databases inside volumes keep their own passwords.
Permissions
| Action | Permission |
|---|---|
| Receiver settings, certificates, stacks open to replication | Full control (Docker administrator) |
| Connections, pull, push, resume, restore | Replicate stacks between servers |
Troubleshooting
| Symptom | What to do |
|---|---|
| The connection test fails | Check that port 9807 is open, that the client address is in Networks allowed to connect, and that receiver mode is on. |
| The stack does not appear in the remote list | Allow replication for that stack on the receiver. |
| A push of a new stack is refused | Turn on Accept new stacks on the receiver. |
| "The two servers use different archive formats" | Update the older appliance. |
| The stack is locked after a restart | A replacement was interrupted. Check Pending restores on the client tab. |
| A volume on NFS or CIFS is refused | Only local volumes and Artica disk quota volumes are copied. |