TM² Dedicated Server init.d Scripts

On Unix/Linux starting and stopping applications is commonly done via init.d scripts (on System V-derived distributions) and less commonly via rc* scripts (on BSD-derivatives). Variants such as the custom init system on Gentoo and new developments like initng and upstart also exist. See Wikipedia for more information on init.

This page aims to collect proven and tested init.d scripts for the TM² dedicated server on a variety of distros. You are encouraged to submit scripts for distros not listed here, as well as other useful start/stop scripts. The dedicated server is required by XASECO2, and scripts for that can also be found on this site.

For more discussion of Linux start-up scripts, see for example this thread [] and this one []. For a web interface to starting/stopping TM-related processes, try the Nouse Web Tool Bundle [].


The entire TrackMania² server system is assumed to be installed in /home/tm2/, with the dedicated in /home/tm2/TM2/ and XASECO2 in /home/tm2/xaseco2/. The user is named tm2 and the group is tm, allowing for multiple TM users within this same group. You are of course free to deviate from this but will then have to adapt the scripts yourself.

Processes are started under the aforementioned user, and can be accessed (e.g. to check their status) by process name or ID. It is therefore recommended (and for some scripts mandatory) that the process name is unique when running multiple dedicated servers and XASECO2s.

Process IDs can be stored in /var/run/*.pid files, and process locks in /var/lock/ or /var/lock/subsys/ can help prevent running the same process more than once, but not all distros deploy both mechanisms.

When scripts invoke the standard script that launches the dedicated server, that is expected to look similar to this:
/home/tm2/TM2/ :
cd /home/tm2/TM2
./ManiaPlanetServer /game_settings=MatchSettings/CanyonA.txt /dedicated_cfg=dedicated_cfg.txt \
The init.d script itself is expected to be named /etc/init.d/tm2d.

Scripts Index

Last updated: 2023-07-06