Running Mordhau Server as a Linux systemd Service
Set up a systemd service for your Mordhau dedicated server so it starts on boot and restarts automatically after crashes. Includes a complete unit file template and management commands.
Running Mordhau as a systemd Service
systemd gives you automatic restart on crash, startup on boot, and centralized log management without needing screen or tmux.
Step 1 — Create a Dedicated User
sudo useradd -m -s /bin/bash steam
Install the server under /home/steam/mordhau/ as this user.
Step 2 — Pre-configure the Server
Before enabling the service, run the server once manually as the steam user to generate config files, then configure them:
sudo -u steam bash -c "cd /home/steam/mordhau && ./Mordhau/Binaries/Linux/MordhauServer-Linux-Shipping FFA_Cortile -Port=7777 -BeaconPort=15000 -QueryPort=27015 -log"
# Wait for full init, then Ctrl+C
Then edit Mordhau/Saved/Config/LinuxServer/Game.ini with your server name, passwords, and map rotation before proceeding.
Step 3 — Create the Unit File
Create /etc/systemd/system/mordhau.service:
[Unit]
Description=Mordhau Dedicated Server
After=network.target
[Service]
Type=simple
User=steam
WorkingDirectory=/home/steam/mordhau
ExecStart=/home/steam/mordhau/Mordhau/Binaries/Linux/MordhauServer-Linux-Shipping \
FFA_Cortile \
-Port=7777 \
-BeaconPort=15000 \
-QueryPort=27015 \
-MultiHome=0.0.0.0 \
-log
Restart=on-failure
RestartSec=10
KillSignal=SIGTERM
StandardOutput=journal
StandardError=journal
SyslogIdentifier=mordhau
[Install]
WantedBy=multi-user.target
Adjust the starting map to your preference. The map rotation in Game.ini takes over after the first match.
Step 4 — Enable and Start
sudo systemctl daemon-reload
sudo systemctl enable mordhau
sudo systemctl start mordhau
sudo systemctl status mordhau
Managing the Service
| Command | Effect |
|---|---|
sudo systemctl start mordhau |
Start the server |
sudo systemctl stop mordhau |
Stop the server |
sudo systemctl restart mordhau |
Restart the server |
sudo systemctl status mordhau |
Show status + recent logs |
journalctl -u mordhau -f |
Follow the live server log |
journalctl -u mordhau -n 100 |
Last 100 log lines |
Editing Config While the Service is Running
Never edit Game.ini while the service is running. Mordhau overwrites config files on clean shutdown, which will discard any changes made while the server was active.
Correct workflow:
sudo systemctl stop mordhau
# Edit Mordhau/Saved/Config/LinuxServer/Game.ini
sudo systemctl start mordhau
Updating the Server
sudo systemctl stop mordhau
sudo -u steam /home/steam/steamcmd/steamcmd.sh \
+force_install_dir /home/steam/mordhau \
+login anonymous \
+app_update 629800 \
+quit
sudo systemctl start mordhau