Trackmania Nations Forever on Linux
Run a Trackmania Nations Forever or ManiaPlanet server on Linux. Covers extracting the native Linux binary, permissions, running as a background process, and systemd service configuration.
Trackmania Nations Forever on Linux
The Trackmania server download includes a native Linux binary — no Wine required. This guide covers the full Linux setup and systemd service configuration.
Downloading and Extracting
# Create a directory
mkdir -p /opt/tmnf-server
cd /opt/tmnf-server
# Download the TMNF server binary
wget -O TrackmaniaServer_Latest.zip \
http://files.v04.maniaplanet.com/server/TrackmaniaServer_Latest.zip
unzip TrackmaniaServer_Latest.zip
rm TrackmaniaServer_Latest.zip
For ManiaPlanet (TM2):
wget -O ManiaplanetServer_Latest.zip \
http://files.v04.maniaplanet.com/server/ManiaplanetServer_Latest.zip
unzip ManiaplanetServer_Latest.zip
Setting Permissions
# Make the binary executable
chmod +x /opt/tmnf-server/TrackmaniaServer
# Create a dedicated non-root user
sudo useradd -r -m -d /opt/tmnf-server -s /sbin/nologin trackmania
sudo chown -R trackmania:trackmania /opt/tmnf-server
Configuring the Server
Edit GameData/Config/dedicated_cfg.txt before first launch:
nano /opt/tmnf-server/GameData/Config/dedicated_cfg.txt
At minimum, set:
<name>— your server's display name<login>and<password>in<masterserver_account>— your Nadeo account<password>in<authorization_levels>for each tier — change from defaults
Test Launch (Foreground)
su -s /bin/bash trackmania -c '
cd /opt/tmnf-server
./TrackmaniaServer /nodaemon /internet \
/dedicated_cfg=dedicated_cfg.txt \
/game_settings=MatchSettings/Nations/NationsBlue.txt
'
The /nodaemon flag keeps it in the foreground so you can see output. Press Ctrl+C to stop.
Systemd Service
Create /etc/systemd/system/tmnf-server.service:
[Unit]
Description=Trackmania Nations Forever Dedicated Server
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=trackmania
Group=trackmania
WorkingDirectory=/opt/tmnf-server
ExecStart=/opt/tmnf-server/TrackmaniaServer \
/internet \
/dedicated_cfg=dedicated_cfg.txt \
/game_settings=MatchSettings/Nations/NationsBlue.txt
Restart=on-failure
RestartSec=15s
StandardOutput=journal
StandardError=journal
SyslogIdentifier=tmnf-server
[Install]
WantedBy=multi-user.target
Enable and start:
sudo systemctl daemon-reload
sudo systemctl enable tmnf-server
sudo systemctl start tmnf-server
Check status and logs:
sudo systemctl status tmnf-server
sudo journalctl -u tmnf-server -f
Running Multiple Servers
Each server instance needs a different game port, P2P port, and XMLRPC port. Copy the full server directory for each instance and modify the ports in each copy's dedicated_cfg.txt:
- Server 1:
server_port=2350,server_p2p_port=3450,xmlrpc_port=5000 - Server 2:
server_port=2351,server_p2p_port=3451,xmlrpc_port=5001
Create a separate systemd service file for each instance.