Do you need a dedicated server?
Only if the world should keep running without you. The wiki's in-game Host Multiplayer Game option suits a few players and ends when you close the game; the dedicated server is a separate program with no graphics that runs around the clock.
- For two or three friends, hosting from inside the game is simpler. The dedicated server plays maps in survival, sandbox, attack or PvP and offers no campaign command.
- For a group that drops in at different hours, a dedicated server keeps the map up; the wiki says to give it a machine of its own, running Linux or Windows.
- For a public community, you want the dedicated server plus the moderation tools further down.
What the server needs from you
The server is one file, server-release.jar, published with every release on the game's GitHub page; v160.7 was current on 31 October 2026. It is a Java program, and the game's build settings target Java 17, so that is the version we install. Mindustry's makers publish no processor or memory requirement for the server, so we will not invent one.
| What | Where or which | Why it matters |
|---|---|---|
| Game port | 6567, TCP and UDP | Players connect here; change it with config port |
| Game version | The same as your players | Devices connect only when they run the same version (wiki FAQ) |
| Saves | config/saves/ | Your named saves and the automatic ones |
| Maps | config/maps/ | Custom maps you add; reloadmaps picks them up |
| Mods and plugins | config/mods/ | Content mods and JVM plugins; mods lists what loaded |
The folder layout comes from Vars.java and ServerControl.java; the server creates config/ in whichever folder it starts from. Mindustry is licensed under GPL-3.0. In plain terms (our reading, and not legal advice): hosting games with it asks nothing of you, as GPL-3.0 has no network clause, yet giving copies to others, changed or unchanged, means offering them the corresponding source, shipped with the copies or through another method listed in section 6 of the licence.
The server that fits
No other customer shares the machine, so nobody slows your world down. Each processor in our dedicated game server table rates at least 2,000 in PassMark's one-thread benchmark. One Mindustry world needs nothing grand to begin with: Intel's Xeon E3-1585L v5, with 4 cores, 32 GB of memory and NVMe storage, is the least expensive fast option and you can have it in any of our five cities. Physically it is an HPE ProLiant m710x cartridge; that model, like the m510, has its own console for when a network change locks you out.
Running a second world means a second folder, service, game port (config port) and command port (config socketInputPort), with the stop, quicksave and backup commands changed to match.
A machine that is already racked is handed to you about 30 minutes from the approval of your order. Building one to your order needs 4 to 24 hours when we hold the parts, and longer if one of them must be bought in. Before choosing a city, time the round trip from your own browser on the game servers page, or ping the test addresses listed on our locations page.
Up and running in an evening
Order the machine with Ubuntu 24.04 (our Linux servers list the systems on offer), log in over SSH as root and paste the block below. It switches on the firewall with SSH as the only way in, installs Java, makes a mindustry user that owns /srv/mindustry, fetches the server, compares it with the SHA-256 fingerprint GitHub shows, and registers a systemd service (the part of Linux that starts programs at boot and restarts them after a crash). Nothing starts yet. After an error, fix the cause and paste the whole block again.
# Run as root on Ubuntu 24.04. TAG and DIGEST come from the release page.
TAG=v160.7
DIGEST=f7b899a4038b95b14a824d5f8993984f79d73baa3254c385b6538327f9c0befd
JAR=/srv/mindustry/server-release.jar
sed -i 's/^IPV6=.*/IPV6=yes/' /etc/default/ufw &&
ufw allow OpenSSH && ufw --force enable &&
apt-get update && apt-get install -y openjdk-17-jre-headless curl netcat-openbsd &&
{ getent passwd mindustry >/dev/null ||
useradd --system --create-home --home-dir /srv/mindustry \
--shell /usr/sbin/nologin mindustry; } &&
sudo -u mindustry curl -fL -o "$JAR.download" \
"https://github.com/Anuken/Mindustry/releases/download/$TAG/server-release.jar" &&
echo "$DIGEST $JAR.download" | sha256sum -c - &&
mv "$JAR.download" "$JAR" &&
cat > /etc/systemd/system/mindustry.service <<'UNIT' &&
[Unit]
Description=Mindustry server
Wants=network-online.target
After=network-online.target
[Service]
User=mindustry
WorkingDirectory=/srv/mindustry
ExecStart=/usr/bin/java -jar /srv/mindustry/server-release.jar
ExecStop=-/bin/bash -c "printf 'save main\n' > /dev/tcp/127.0.0.1/6859 && sleep 10"
Restart=on-failure
RestartSec=10
SuccessExitStatus=130 143
[Install]
WantedBy=multi-user.target
UNIT
systemctl daemon-reload && echo "ALL GOOD - go on to the first start" || echo "STOP - read the error above, fix it, run the block again"
How this differs from the official instructions: the wiki simply runs java -jar in a terminal, while the server/run-jar helper in the source code relaunches the server after any exit other than 0 or 130. Our service copies that rule (and also treats 143, the code Java exits with when systemd stops it, as a clean stop), leaves out the helper's heap-dump option, and adds one thing of ours: before stopping, it tells the server to save.
Next, start the server by hand once so you can type into it: cd /srv/mindustry && sudo -u mindustry java -jar server-release.jar. At its prompt, enter these one at a time:
config namefollowed by a name that tells people what sort of server they are joining, andconfig descfollowed by a short description.config autosave true, which is off until you turn it on. After that the server saves every five minutes and keeps the latest ten automatic saves.config socketInputAddress 127.0.0.1and thenconfig socketInput true, to give you a private command line later.maps allto see the maps, thenhostfollowed by a map name (underscores instead of spaces) andsurvival.save main, and wait until it reports the save.config startCommands load main, so the service reopens that world whenever it starts, and finallyexit.
Last, open the door for players and hand the server to systemd: ufw allow 6567 && systemctl enable --now mindustry. Without a protocol, that rule opens TCP and UDP, for IPv4 and IPv6 alike; ufw status shows it. Your friends add the server's address under Join Game in the game.
Talking to the server once it runs
The service has no terminal, so send commands through the socket with nc 127.0.0.1 6859 and press Ctrl+C when you are done. To follow what players do, journalctl -u mindustry -f shows the live log. Do not leave nc open: the server takes one socket connection at a time (ServerControl.java), and an idle session makes the backup's save request wait in line.
That command line has no password. Whatever runs on the machine can send any console command to port 6859 on 127.0.0.1, js included, and that one executes any JavaScript. Leave it bound to 127.0.0.1, never open 6859 in the firewall, and do not hand out logins to the machine.
Keeping order on a public server
Join the game yourself first, then, while the server is hosting, type admin add and your in-game name on the command line. By name it only finds someone who is online; someone offline can still be given admin through their player ID. Some protection is on from the start, according to Administration.java: spam control, strict mode, vote-kicking, and a refusal of custom (unofficial) game clients.
- For friends only, turn on
config whitelist true, thenwhitelist addeach player's ID. - Deal with troublemakers using
kick,banby name, IP or ID, andunbanif you change your mind. - On a quiet server,
config autoPause trueholds the waves until somebody joins.
Want strangers to find you in the game's server browser? Listing is done by pull request to the MindustryServerList project on GitHub. Its rules ask for moderators who actually act, a name or description that tells newcomers what to expect, no mods players must install, and a server that is up when the reviewers try to join.
Saving your world, and getting it back
This job runs at 05:15 every night. It asks the server to save, waits 15 seconds, then packs up /srv/mindustry (saves, maps, mods, settings and the server file) plus the service file, checks the archive opens and holds main.msav, and only then clears copies older than 10 days. It also saves main every 10 minutes. The times are our suggestion.
# Run as root. Creates the nightly backup job and takes the first copy now.
cat > /usr/local/sbin/mindustry-nightly.sh <<'JOB' &&
umask 077
keep=/var/backups/mindustry
mkdir -p -m 700 "$keep" || exit 1
printf 'save main\n' > /dev/tcp/127.0.0.1/6859 && sleep 15
file="$keep/world-$(date +%F-%H%M%S).tar.gz"
if tar -czf "$file.tmp" -C / srv/mindustry etc/systemd/system/mindustry.service &&
tar -tzf "$file.tmp" > /dev/null &&
tar -xzOf "$file.tmp" srv/mindustry/config/saves/main.msav > /dev/null; then
mv "$file.tmp" "$file" && echo "saved $file" &&
find "$keep" -name 'world-*.tar.gz' -mtime +10 -delete
else
rm -f "$file.tmp"; echo "backup FAILED, see the messages above" >&2; exit 1
fi
JOB
chmod 700 /usr/local/sbin/mindustry-nightly.sh &&
printf '%s\n' "printf 'save main\\n' > /dev/tcp/127.0.0.1/6859" > /usr/local/sbin/mindustry-quicksave.sh &&
printf '%s\n' '*/10 * * * * root bash /usr/local/sbin/mindustry-quicksave.sh > /dev/null 2>&1' \
'15 5 * * * root bash /usr/local/sbin/mindustry-nightly.sh >> /var/log/mindustry-backup.log 2>&1' > /etc/cron.d/mindustry-nightly &&
bash /usr/local/sbin/mindustry-nightly.sh || echo "STOP - the first backup did not complete"
If tar says a file changed while it read, a save landed mid-copy; the job discards it and retries the next night. Send /var/backups/mindustry off to another computer regularly: copies kept on the server's own drives would vanish with those drives. You install and run the game; we keep the machine running. Stopping or rebooting saves main first. After a crash the server comes back on the last main save, no more than about 10 minutes old, though an autosave may be newer. To pick one up, enter stop, list them with saves, and give load the autosave's file name minus .msav.
To bring a backup back, paste the block below as root. It refuses to start when the file is missing or damaged, or when a folder from a previous restore is still in the way. On a fresh machine, run the setup block first, then ufw allow 6567 && systemctl enable mindustry, then the restore block, and finally the backup block one time to set up the nightly job there too.
# Run as root. Put the name of the backup you want after pick=
pick=/var/backups/mindustry/world-2026-10-31-051500.tar.gz
if [ ! -f "$pick" ] || ! tar -tzf "$pick" > /dev/null; then
echo "STOP - that backup is missing or damaged"
elif [ -e /srv/mindustry.before-restore ]; then
echo "STOP - an earlier set-aside copy is still there; remove it or roll back first"
else
systemctl stop mindustry &&
mv /srv/mindustry /srv/mindustry.before-restore &&
tar -xzf "$pick" -C / srv/mindustry &&
chown -R mindustry:mindustry /srv/mindustry &&
systemctl start mindustry &&
echo "RESTORED - your previous files are in /srv/mindustry.before-restore" ||
echo "STOP - the restore stopped part way; roll back as described below"
fi
If the restored world is wrong, go back with `systemctl stop mindustry; test -d /srv/mindustry.before-restore && { test -e /srv/mindustry.broken || { test ! -d /srv/mindustry || mv -T /srv/mindustry /srv/mindustry.broken; }; } && test ! -e /srv/mindustry && mv -T /srv/mindustry.before-restore /srv/mindustry && systemctl start mindustry.service && echo 'BACK IN PLACE' || echo 'STOP - read the output above'. Seeing STOP? Either the copy you set aside no longer exists, or an old /srv/mindustry.broken is in the way (move it elsewhere and try again), or your files are back where they belong but the server would not start, in which case journalctl -u mindustry tells you why. Once you are happy, delete /srv/mindustry.before-restore`.
Questions people ask
- How do I update the server when the game updates?
- Players can join only while their game version matches the server's, so update soon after a release. Take a backup with
bash /usr/local/sbin/mindustry-nightly.sh, stop the server withsystemctl stop mindustry, changeTAGandDIGESTat the top of the setup block to the new release and paste the block again, then runsystemctl start mindustryonce it prints ALL GOOD. If the new file does not match its fingerprint, the block stops, the old file stays where it was, andsystemctl start mindustrybrings the old version back up. - Why does my server keep restarting after I added a mod?
- When a mod's content has errors, the server lists them and exits with code 1 (ServerLauncher.java), and the service tries again every 10 seconds. Read
journalctl -u mindustry, remove or fix the mod inconfig/mods/, and it will start normally. - Can I host the campaign on a dedicated server?
- Not as a campaign. The server's host command plays maps in survival, sandbox, attack or PvP, and loading a save also cuts its tie to a campaign sector (ServerControl.java); write that save over its old slot and the tie is gone. For campaign play with friends, host from within the game instead. Begin a game, pause it and choose Host Multiplayer Game, which is how the wiki FAQ explains playing on a shared network.