Moving your self-hosted agent server to a new machine
After a server move, old data returns, credentials fail and triggers receive nothing. Seven checks: what must travel, stay the same and be re-pointed.

Most server moves are planned as a hardware job. Order the new machine. Copy the data. Change the address. Switch off the old one. The plan fits on a sticky note.
That plan works for a file server. A server that runs AI agents and workflows holds more than its data: stored credentials that only open with one key, triggers that outside systems call at a fixed address, schedules, and a database whose structure belongs to one version of the software. Running it yourself means you decide where it lives and when it moves; for more on that choice, see Self-hosted AI: how to own your AI stack.
When a move goes wrong, it rarely goes wrong loudly. The new server starts, and the screens load. Then a stored credential will not open, a trigger says active and receives nothing, or the data is older than it should be. Reports from June to September 2026 show each of these.
What went missing in four reports
A key that changed at every restart. A team that runs a workflow tool with its own database on its own container clusters described a long run of failed webhook calls on the vendor's community forum in August 2026. The team listed six causes, most of them in its own setup. One of them: the tool's state folder sat on a temporary volume. After every restart, the folder was empty again, and every webhook answered "not found", because its registration was gone. A forum member with a Top Supporter badge added a second effect: with the state folder on a temporary layer, the generated encryption key also changes at every restart, and stored credentials can no longer be decrypted. About 2,300 runs from the outage were still waiting in the queue days later.
A large database, and a fear of locking. A user whose self-hosted server kept crashing at weekends asked on a forum in September 2026 how to move the tool's database, about 40 GB, to a virtual machine, and whether it would lock up during the move. It is the right question, and it is best asked before the move, not during it.
Two more reports, one line each. In June 2026, a user reported that after the hosting provider moved their server, the workflow tool came back with data from months earlier; the reporter did not blame the tool. In September 2026, a user who moved a workflow from a hosted service to their own server reported a trigger that showed as active and received nothing, until they created its credentials again.
A move is a copy of state
In each report, the machine was not the problem. Something that held state did not arrive, arrived old, or arrived without the key that opens it.
So think of a move as a copy of state, not of a server. State is the data, the files, one secret, and the addresses that the outside world uses to reach you. Everything else can be built again from the release you install. The checklist below is about the state. For moving single flows from one installation to another, see It worked in test. Moving it to production broke it.
Seven checks for the move
These checks fit any platform that runs AI agents and workflows on your own servers, ours included. Where EpicStaff gives an answer, it stands under the check.
1. List everything that holds state, and move all of it
Write the list from the setup files, not from memory. A typical list has the database, the file store, uploaded media and the settings file. Then add anything your own setup mounts from the host, such as certificates. Before the final copy, stop every service that writes, so the copy is complete. For a large database, time a copy in advance: the time it takes is the core of your downtime.
In EpicStaff: Move the database volume, the file-store volume, the media volume and your .env file; the rest rebuilds itself. If you turned on the session audit trail, the user audit trail, chat or plugins, move their volumes too.
2. Keep the secret key identical
Many platforms encrypt stored credentials with a key from the settings file or the state folder. With a new key, everything else looks fine, and every stored credential fails. Copy the key with the settings file. Keep a second copy in your password vault, apart from the backups. After the move, test one stored credential before anything else.
In EpicStaff: Stored credentials are encrypted with a key made from DJANGO_SECRET_KEY, so copy that value or they will not decrypt.
3. Know what a clean-up command deletes
After a move, it is tempting to tidy up the old machine at once. Before you do, check which data stores survive each tear-down command, and which are deleted with it. Do not clean up the old machine until the new one has passed every check on this list.
In EpicStaff: The file store's volume (RustFS) is not marked external like the database volume, so docker compose down -v keeps the database but deletes the files in that store.
4. Restore onto the same version first
A move and an upgrade at the same time are two changes. If start-up fails, you cannot tell which one caused it. Write down the exact version or image tag before the move, install that same version on the new machine, and upgrade later as a step of its own. For the upgrade itself, see Before you upgrade your self-hosted agent server.
In EpicStaff: Database migrations run by themselves at start-up, and there is no supported downgrade.
5. Re-point the addresses, and save the triggers that learn their address
Outside systems reach your server through an address: a domain name, a webhook URL registered with another service, a chat bot setting. Point the domain at the new machine. Update every setting that names the old address, such as allowed host names, the front-end address and cross-origin (CORS) settings. Some triggers register their address with the outside service only when they are saved, so a new address means saving them again. After the switch, send one test event to each trigger and check that a run starts. For triggers that say on and do not fire, see The trigger says on. That does not mean it ran.
In EpicStaff: Each webhook's public address comes from its own tunnel or domain setting, not from the machine's name. Point that domain at the new machine; if the address changes, save each Telegram trigger again and rerun the Twilio webhook setup.
6. Check whether missed runs run later
During the switch, schedules on the old server have stopped, and the new server is not yet running. Check whether runs missed while the server was down run later, or are simply skipped. List the scheduled flows that fall in your move window, and decide for each one: run it by hand afterwards, or let it wait for its next time.
In EpicStaff: Active schedules load again when the stack starts.
7. Do a test move before the real one
Take last night's backup and restore it on the new machine, with the old one still live and the addresses unchanged. Start it, open a flow, test one stored credential, open one file a run produced, and start one test run. Time each step, and write it down. That record is your move plan, and the total time is your real downtime estimate. For what a backup must hold after a failure, see The server will fail. What matters is what survives it.
The old machine is your way back
When the new server runs, the old one is still the only copy you know works. Keep it intact, and switched off, until the new server has run a full cycle of your schedules, for example one working week.
Make sure the old machine cannot start its schedules or triggers again by itself, for example after a power cut. Two servers that run the same schedules write to the same outside systems twice.
Then wipe it, the settings file included. That file holds the key that opens every stored credential, and it should exist in only two places: the new server and your vault.
Q&A
How do I copy a Docker volume to a new server?
Stop the containers that write to the volume. Pack the volume's contents into an archive with a short-lived helper container, copy the archive to the new server, and unpack it into a volume with the same name. Compare the size or a checksum on both sides. For a database, prefer the database's own export tool: it gives a consistent copy, even of a large database.
How long should I plan for a server migration?
Plan for the copy time of your largest data store, plus the time for your checks, plus the time it takes for a changed domain name to reach every caller. Measure the first two in a test move. For the third, lower the DNS time-to-live (TTL) a day or two before the move, so that callers pick up the new address quickly.
Can the old and the new server run side by side during a migration?
For checks, yes, as long as only one of them runs triggers and schedules. If both run them, each event can start two runs, and both may write to the same outside systems. Keep triggers and schedules off on the new server until the moment of the switch, then switch them off on the old one first.
How do I move EpicStaff to a new server?
Move the database volume, the file-store volume, the media volume and your .env file; the rest rebuilds itself. If you turned on the session audit trail, the user audit trail, chat or plugins, move their volumes too. Stored credentials are encrypted with a key made from DJANGO_SECRET_KEY, so copy that value or they will not decrypt.


