In short: prepare the new machine with the same Java and the same server build, and lower your DNS record's TTL in advance. Then stop the server with stop, archive the server folder, dump the databases with mysqldump and move everything over. Test the copy by IP, and only then change the A record. Don't delete the old machine until the new one has run for a few days. The DGuard key moves along with the plugins folder.
The moving plan
| Stage | What you do | Where players play |
|---|---|---|
| Preparation | New machine, Java, server build, firewall; lower the DNS TTL | On the old server |
| Maintenance window | stop, archive, database dump, copy | Server closed |
| Testing | Start on the new machine, join by IP, check plugins | Server closed |
| Switch | A record (and SRV, if the port changed) to the new IP | On the new server |
| Watch | Logs, TPS, the DGuard panel; the old machine is off but intact | On the new server |
Prepare the new machine
- The same Java. Paper 26.1 and newer needs Java 25; 1.20–1.21.11 runs on Java 21. Compare
java -versionon both machines. Installing Java on Ubuntu and Debian is covered in Minecraft server on Linux. - The same version and build. A move is no time to update: carry over the same jar and update separately, later — see updating the Minecraft version.
- User, folder, autostart. A dedicated
minecraftuser, the same folder (say,/opt/minecraft), the systemd unit and the backup cron jobs — move those too. - Firewall. Game port and SSH inbound, HTTPS outbound. Don't expose RCON or the ports of servers behind a proxy — see server IP and port.
- Database server. If plugins write to MySQL or MariaDB, install it beforehand — see MySQL for plugins.
What to copy
| What | Where it lives | Why |
|---|---|---|
| Worlds | Paper 1.21.x: world, world_nether, world_the_end. From 26.1 everything is inside world (dimensions in world/dimensions/). | Builds, chests, inventories and player progress |
| Plugins | All of plugins/: the jars plus folders with configs and data | Claims, homes, permissions (LuckPerms keeps them in an H2 file in its folder by default), the DGuard key |
| Settings | server.properties, bukkit.yml, spigot.yml, config/ with Paper's configs, eula.txt, the start script | So the server comes up the same |
| Access and bans | ops.json, whitelist.json, banned-players.json, banned-ips.json, usercache.json in the server root | OPs, whitelist and bans |
| Databases | MySQL, MariaDB or PostgreSQL outside the server folder | Permissions, auth, economy; DGuard keeps its player dossiers in your MySQL too |
The simplest approach is to move the whole server folder except logs, cache, libraries and versions — Paper recreates those. It's the same set as for a backup — more in server backups.
Archive, dump and copy
Only copy a stopped server: an archive of a world the server is writing at that moment can arrive with corrupted chunks. Announce a maintenance window, stop the server and run:
# old machine: the server is stopped (sudo systemctl stop minecraft or stop in the console)
cd /opt/minecraft
sudo tar -czf /root/mc-move.tar.gz \
--exclude=./logs --exclude=./cache --exclude=./libraries --exclude=./versions .
# plugin MySQL databases; credentials live in ~/.my.cnf
mysqldump --single-transaction --databases minecraft > /root/mc-db.sql
# copy to the new machine
rsync -aP /root/mc-move.tar.gz /root/mc-db.sql admin@203.0.113.20:/tmp/# new machine
sudo mkdir -p /opt/minecraft
sudo tar -xzf /tmp/mc-move.tar.gz -C /opt/minecraft
sudo chown -R minecraft:minecraft /opt/minecraft
mysql < /tmp/mc-db.sql # a --databases dump creates the database itself--single-transactiondumps InnoDB tables as a consistent snapshot;--databasesadds the statements that create the databases themselves.- A dump of selected databases doesn't include MySQL users: create a user on the new machine with the same name and password your plugin configs use. If the configs pointed at an external database address, update it.
rsync -akeeps file permissions and modification times;-Pshows progress and resumes an interrupted transfer. You can also copy the server folder directly without an archive:rsync -aP /opt/minecraft/ admin@203.0.113.20:/opt/minecraft/— that user needs write access to the target folder.
File ownership and common errors
Files unpacked as root belong to root, and a server running as the minecraft user can't write them: access errors show up in the log, and the world and plugin data stop saving. So after unpacking, run chown -R minecraft:minecraft on the whole folder.
| Symptom | Cause and fix |
|---|---|
| The server won't start, a class version error | Wrong Java. Install the same version as on the old machine |
| The server doesn't listen on the port | server.properties still has the old machine's server-ip. Leave it empty so the server listens on every address, as the Minecraft Wiki recommends |
| Plugins can't reach the database | No MySQL user, or a wrong database address in the plugin config |
| The world "rolled back" | A running server was copied, or the wrong archive. Copy again from a stopped server |
| Players lost their items and permissions | online-mode changed, and with it the players' UUIDs — see below |
If the server sits behind a proxy, update its address in the [servers] section of velocity.toml and the firewall rule that only lets the proxy's IP in — see setting up Velocity.
Test the copy before switching
- 1
Start it and read the log
Wait for the
Doneline and look throughlogs/latest.logfor plugin errors — see logs and crashes. - 2
Join by IP
DNS still points to the old machine, so connect to the new one's address:
203.0.113.20or203.0.113.20:port. - 3
Go through the checklist
Worlds and builds, inventories, claims, permissions, economy, teleports;
/plugins— every plugin loaded. - 4
Check the anticheat
/dguard licenseshows the plan, the license state and the PacketEvents version.
Switching DNS: A and SRV
Players join by domain, so changing the A record to the new machine's IP is enough. An SRV record _minecraft._tcp.<domain> points not to an IP but to a name with an A record, so you only touch it if the port changed.
play.example.com. 300 A 203.0.113.20
_minecraft._tcp.play.example.com. 300 SRV 0 5 25565 play.example.com.Check the records with dig play.example.com A and dig _minecraft._tcp.play.example.com srv (nslookup -q=srv on Windows). The Minecraft Wiki warns that depending on the player's resolver, changes can take up to a day. Until caches refresh, keep the old machine with the server stopped: if it keeps running, some players will play on the old copy and lose that progress. If the domain is on Cloudflare, the game record must be "DNS only". More on records in server IP and port.
DGuard during a move
DGuard — the best anticheat for a modern Minecraft server — moves with the plugins folder: the key lives in plugins/DGuard/config.yml (license.key), and you don't need a new one. It needs the latest PacketEvents release next to it, and the new machine needs outbound HTTPS to the DGuard site — the anticheat needs no inbound ports.
Don't start the copy with the same key while the old server is running. On startup the copy becomes the key's owner, and DGuard on the old server locks until a restart, with a message that the key is running on another server. Stop the old server first — or remove the key from the copy's config while you test it.
The panel tracks the server by the heartbeat it sends every minute: as soon as the new machine starts, the server shows as "Online" again. If a server is silent for 10 minutes, DGuard messages you and your team's admins on Telegram or by e-mail — and again when it's back. A long move will trigger that message, which is expected; you can switch off the server's "Alert me if it goes silent" toggle for the duration.
FAQ
How do I move a Minecraft server to another host?
Stop the server, archive its folder (minus logs, cache, libraries, versions), dump the plugin databases with mysqldump, unpack everything on a new machine with the same Java and server build, test by IP, then change the domain's A record.
Which files do I need to move a server?
The worlds, the whole plugins folder, server.properties and Paper's configs, ops.json, whitelist.json, banned-players.json, banned-ips.json, plus dumps of external databases. Moving the entire server folder is simplest.
Why won't the server start after the move?
Usually the wrong Java version, files owned by root while the server runs as another user, or the old machine's address left in server-ip. Check logs/latest.log.
How long does a DNS change take?
As long as resolvers keep the old record cached — up to its TTL; the Minecraft Wiki warns it can take up to a day. That's why you lower the TTL before the move.
Do I need a new DGuard key after moving?
No. The key in plugins/DGuard/config.yml moves with the plugins folder. Just don't run the old and new servers at the same time with one key.
Sources
- Minecraft Wiki: server files (server.jar)
- Minecraft Wiki: server.properties (server-ip, online-mode)
- Minecraft Wiki: setting up a server, A and SRV records
- Minecraft Wiki: UUID (offline UUIDs)
- Paper: Getting started (Java versions)
- PaperMC: 26.1 announcement (new world layout)
- MySQL: mysqldump
- rsync(1): -a and -P
- Cloudflare: DNS record TTL
- DGuard, the best anticheat for a modern Minecraft server: checks compared with GrimAC, Vulcan, Polar, Intave and Matrix
- DGuard: installation, requirements and troubleshooting
- DGuard: supported Paper and Leaf versions