Mindustry Updated April 29, 2026

Running Mindustry Server as a Linux systemd Service

Set up a systemd service for your Mindustry server so it starts on boot and restarts automatically after crashes. Includes a complete unit file and management commands.

MindustryLinuxsystemdserviceautostartcrash recovery

Running Mindustry as a systemd Service

systemd gives you automatic restarts on crash, clean log management, and start-on-boot — all without screen or tmux sessions.


Step 1 — Create a Dedicated User

Run the server as a non-root user:

sudo useradd -m -s /bin/bash mindustry

Place the server JAR and config/ directory under /home/mindustry/server/:

sudo mkdir -p /home/mindustry/server
sudo chown -R mindustry:mindustry /home/mindustry/server

Copy or download server-release.jar there:

sudo -u mindustry wget -O /home/mindustry/server/server-release.jar \
  https://github.com/Anuken/Mindustry/releases/latest/download/server-release.jar

Step 2 — Create the systemd Unit File

Create /etc/systemd/system/mindustry.service:

[Unit]
Description=Mindustry Dedicated Server
After=network.target

[Service]
Type=simple
User=mindustry
WorkingDirectory=/home/mindustry/server
ExecStart=/usr/bin/java -jar server-release.jar
Restart=on-failure
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=mindustry

[Install]
WantedBy=multi-user.target

Note: The server's config/ directory is created relative to WorkingDirectory. Make sure WorkingDirectory is set to the folder containing server-release.jar.


Step 3 — Configure Auto-Start Map

Before enabling the service, set the server to automatically host a map on startup:

Start the server manually once as the mindustry user:

sudo -u mindustry bash -c "cd /home/mindustry/server && java -jar server-release.jar"

In the server console:

config startCommands "host Serpulo survival"

Then type exit or Ctrl+C. The setting is now saved to config/settings.bin.


Step 4 — Enable and Start the Service

sudo systemctl daemon-reload
sudo systemctl enable mindustry
sudo systemctl start mindustry
sudo systemctl status mindustry

Managing the Service

Command Effect
sudo systemctl start mindustry Start the server
sudo systemctl stop mindustry Stop the server
sudo systemctl restart mindustry Restart
sudo systemctl status mindustry Show status and recent logs
journalctl -u mindustry -f Follow live logs
journalctl -u mindustry -n 50 Last 50 log lines

Updating the Server

sudo systemctl stop mindustry
sudo -u mindustry wget -O /home/mindustry/server/server-release.jar \
  https://github.com/Anuken/Mindustry/releases/latest/download/server-release.jar
sudo systemctl start mindustry

Automatic Updates (autoUpdate)

Alternatively, enable the autoUpdate config option in the server console before setting up systemd:

config autoUpdate true

When a new Mindustry version is released, the server exits cleanly. Pair this with a systemd ExecStartPre that downloads the latest JAR so the update happens automatically on restart.