Launch sale20% off everything — celebrating the launch of GHosting!
← All guides

How to Host a Mindustry Dedicated Server on Linux

Mindustry has a real dedicated server, not a player-hosted workaround. The official headless JAR runs on Linux, keeps the factory and waves online when the usual host logs out, and lets Windows, Linux, Android and iOS players join the same world when everyone uses the same game build.

Automated factory outposts linked across a volcanic coast on a Mindustry dedicated server Skip Java, port forwarding and service setup with managed Mindustry hosting

What you need

Use a Linux machine that can stay online, Java 17 or newer, and a fresh directory for the server. Mindustry's upstream project publishes the dedicated build as server-release.jar in its GitHub releases. It is a native Java server, so it does not need SteamCMD, Wine or a desktop game client.

The default port is 6567. It must be reachable on both TCP and UDP. At home, also forward both protocols from the router to the machine's fixed private address. A VPS or game host normally replaces that router work with a public address and firewall rule.

1. Install Java and fetch the official server

On Ubuntu 24.04 or another Debian-based Linux system, create a non-root account and install the JRE plus curl:

sudo adduser --disabled-password --gecos "" mindustry
sudo apt-get update
sudo apt-get install -y openjdk-17-jre-headless curl
sudo -u mindustry mkdir -p /home/mindustry/server
cd /home/mindustry/server
curl -fL https://github.com/Anuken/Mindustry/releases/latest/download/server-release.jar   -o server-release.jar

Keep the JAR and its data in this one directory. Mindustry creates configuration, maps, saves, logs and server-side plugins relative to its data directory. Splitting them across folders is an easy way to lose an autosave or load the wrong config after an update.

2. Start it once and host a map

cd /home/mindustry/server
java -jar server-release.jar

When the console says the server loaded, it is not necessarily joinable yet. You still need to host a map. This missed step causes many reports of a server that looks healthy in the terminal but returns “Can't connect to host” to players.

maps all
host Ancient_Caldera survival

You can also run host without a map name to choose a random survival map. After a successful command, the console should confirm that it opened the server on its port.

3. Set the name, port and player limit

config name Core Crew
config desc A relaxed co-op factory
config port 6567
playerlimit 16
config autosave true
config autosaveSpacing 300

The description is limited to 100 characters. The player limit is a separate server command, so setting the name alone does not cap a public server. Automatic saves are worth enabling before the first serious wave. Keep a separate backup copy before changing versions, trying large plugins or clearing a world.

4. Open TCP and UDP 6567

sudo ufw allow 6567/tcp
sudo ufw allow 6567/udp

If you changed the port with config port, replace 6567 in both rules. Then match that port in the router's TCP and UDP forwarding rules. A friend on a different internet connection should add your public IP and port through Play → Join Game → Add Server.

5. Make the server survive logouts and reboots

SSH sessions are not a service manager. A systemd unit gives the JAR a fixed working directory, automatic restart after a crash and startup after a machine reboot. The open pipe keeps Mindustry's console from treating systemd input as an immediate end-of-file:

[Unit]
Description=Mindustry dedicated server
After=network-online.target

[Service]
User=mindustry
WorkingDirectory=/home/mindustry/server
ExecStart=/usr/bin/bash -c 'if find config/saves -maxdepth 1 -name "auto_*.msav" -print -quit 2>/dev/null | grep -q .; then CMD=loadautosave; else CMD=host; fi; tail -f /dev/null | exec /usr/bin/java -Xms256m -Xmx1536m -jar server-release.jar "$CMD"'
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now mindustry
sudo journalctl -u mindustry -f

The launch command checks for an automatic save and runs exactly one Mindustry command: loadautosave for an existing world or host for a new server. Test the restore workflow with a copy of your live save before relying on it for a public community.

Maps, saves and plugins

Custom maps use the .msav format. Put them in the server's map directory, run reloadmaps, then use host Your_Map_Name survival. A map made for a newer game build can fail on an older dedicated server.

Server plugins are JAR files in config/mods/. They are server-side only, but they run Java code with the server account's privileges. Only install trusted plugins, keep a backup before adding one and watch the first startup log closely.

Update deliberately, not blindly

Mindustry is cross-platform, but clients on a different build cannot join. Mobile storefront approval can lag a desktop release, so do not update just because a GitHub release exists. Let every player update, back up saves, then replace the JAR and restart:

cd /home/mindustry/server
curl -fL https://github.com/Anuken/Mindustry/releases/latest/download/server-release.jar   -o server-release.jar
sudo systemctl restart mindustry

Keep the bleeding-edge autoUpdate setting off for a mixed mobile and desktop group unless everyone follows that channel. A short planned update is far less painful than a factory half the group cannot enter.

Managed alternative

GHosting Mindustry servers install the official JAR in a Linux container, give it a public port over TCP and UDP, retain automatic saves, expose player and safety settings, and show the release in the dashboard. You keep the live console and file manager for maps, saves and trusted plugins. Nothing renews automatically.

For commands and current settings, see the official Mindustry server guide, the project's GitHub releases, and the server plugin documentation.