TrackMania Forever

Quick Start Guide:

This is step-by-step guide to setting up a TrackMania Forever (TMF) dedicated server with XASECO for those lost in or confused by the available readme's and tutorials, and those just too lazy to read them. ;-)

It's written for Linux but should largely apply to Windows too, and your system needs to have a working MySQL 4.x or 5.x and PHP 5.x setup. To manage the database, enter the MySQL commands in the mysql command prompt, PhpMyAdmin or another tool of your choice. You need to run the TMF server and XASECO on the same machine, running them on separate machines is beyond the scope of this guide.

First, the dedicated server:

  1. Ideally, the TMF server and XASECO run under a user account rather than root, so create a user e.g. "tmf" with home directory "/home/tmf".
  2. Login as (or switch to) user "tmf" so that all files created down the road receive the correct ownership and permissions.
  3. The TMF server zip doesn't have a top-level directory, so create one first to keep all the server files together, e.g.:
       mkdir TMF
       cd TMF
  4. Download and unzip the latest TMF server ( into this TMF/ directory.
  5. Create a dedicated login:
    1. for TM Nations Forever, use your game client to create a new dedicated server login (note that this server won't be able to use coppers).
    2. for TM United Forever, log into the TMF Player Page using your player login and password, and create a dedicated server login and password (different from your player password) after entering your full game key.
  6. Edit TMF/GameData/Config/dedicated_cfg.txt:
    1. In the <authorization_levels> section, change all three passwords, but do not change the names (SuperAdmin, Admin, User).
    2. In the <masterserver_account> section, enter the server <login> obtained above with its own <password>, and optionally the last three characters of your player key in <validation_key> if you want your TMUF server to be able to use coppers.
    3. In the <server_options> section, give your server a <name> and configure the other options to your liking.
    4. In the <system_config> section, set <connection_uploadrate> and <connection_downloadrate> to values closest to your connection's speed (in Kbps), and remember the three port numbers (default: 2350 for the server, 3450 for P2P and 5000 for XMLRPC; these can be changed to other free port numbers, but it's recommended to keep the defaults at least until your server comes online successfully).
    5. For a TMNF server, <packmask> must be set to 'nations' or 'stadium'. For TMUF it can be empty or set to 'united', or to one environment like 'desert', 'island', etc, or to the three environments of the older games with 'original' or 'sunrise'.
  7. Choose and edit a match settings file, e.g. TMF/GameData/Tracks/MatchSettings/Nations/NationsBlue.txt, to your liking (see the server readme for details).
  8. On your firewall/router, open the server port 2350 and the P2P port 3450 for both UDP and TCP traffic, but not the XMLRPC port 5000. For the Dedimania system in XASECO port 8002 needs to be open as well. For more information on this, may be useful.
  9. A standard startup script is no longer included in the zip, so create one looking like this in (and make it executable with chmod +x
       ./TrackmaniaServer /game_settings=MatchSettings/Nations/NationsBlue.txt /dedicated_cfg=dedicated_cfg.txt
    or in RunTrackmaniaNations.bat:
       TrackmaniaServer.exe /game_settings=MatchSettings/Nations/NationsBlue.txt /dedicated_cfg=dedicated_cfg.txt
    Options /internet and /autoquit are now default, and the /game=... option (from TMN) is no longer needed due to the <packmask> setting.
  10. Start the server:
       cd ~/TMF/
       ./ (or RunTrackmaniaNations.bat)
    You should see output like the following:
    Starting TmForever v2011-02-21...
    Configuration file : dedicated_cfg.txt
    Loading system configuration...
    ...system configuration loaded
    Loading cache...
    Listening for xml-rpc commands on port 5000.
    Trackmania server daemon started with pid=13512 (parent=13483).
    If you get a Segmentation Fault here, the server cannot create files/directories due to ownership/permission problems (perhaps you forgot step 2?).
  11. The first time the server starts, it creates a Default.SystemConfig.Gbx file as well as the blacklist.txt and guestlist.txt files in the GameData/Config/ directory, and a number of directories like Logs/, GameData/Cache/, GameData/Profiles/, GameData/Scores/, GameData/Tracks/Campaigns/, GameData/Tracks/Replays/, GameData/Tracks/Challenges/Downloaded/ and GameData/Tracks/Challenges/My Challenges/. The files in the Logs/ directory are useful to monitor your server's activity.
  12. Start your TMF client and check in the Internet server browser that the server is running in your zone with your chosen server name and the Nadeo Advanced tracks.
  13. Join your server, and have a friend join from elsewhere on the Internet, to verify that the server is accessible.
  14. Ignore the private network warning that is always logged in ConsoleLog.*.txt.
  15. To start & stop your TMF server on Linux more easily, you can use this start-up script.
  16. Collect your own tracks in GameData/Tracks/Challenges/My Challenges/, copy and edit a new match settings file in GameData/Tracks/MatchSettings/ that lists those tracks, use that file in (or RunTrackmaniaNations.bat), and restart your server. It should now be running your track selection. Congratulations. :-)
Secondly, the XASECO system:
  1. Create the XASECO database in MySQL (default "aseco" but any other name is okay too):
       CREATE DATABASE aseco;
    Also create a separate user (e.g. "tmf") in MySQL with a password, and grant this user all rights to the "aseco" database. The basic MySQL commands are:
       CREATE USER 'tmf'@'localhost';
       SET PASSWORD FOR 'tmf'@'localhost' = password('password');
       GRANT all ON aseco.* TO 'tmf'@'localhost';
  2. Login as (or switch to) user "tmf" so that all files created down the road receive the correct ownership and permissions.
  3. Download and unzip XASECO (latest version) into the "/home/tmf/" directory too, the default path will be xaseco/ so that future releases can be unpacked into the same directory tree.
    In the zip file, all *.XML and config files are located inside the newinstall/ directory. Go into the newinstall/ directory and move all *.XML files into the main directory (next to aseco.php), and move all *.PHP files into the includes/ directory.
    Also, move (on Linux) or Aseco.bat (on Windows) into the main directory and adjust it to your situation if necessary.
  4. Setting up the database tables in MySQL is done automatically the first time XASECO runs, but if you prefer you can do it manually in advance:
       USE aseco;
       SOURCE /home/tmf/xaseco/localdb/aseco.sql;
       SOURCE /home/tmf/xaseco/localdb/rasp.sql;
       SOURCE /home/tmf/xaseco/localdb/extra.sql;
  5. Edit xaseco/localdatabase.xml:
    1. Replace YOUR_MYSQL_LOGIN with the MySQL user you created above, e.g. tmf.
    2. Replace YOUR_MYSQL_PASSWORD with the MySQL password you set above.
    3. Use the same database name as you created above, e.g. aseco.
    4. localhost is your own machine, so the server option is okay.
  6. Edit xaseco/config.xml:
    1. In the <masteradmins> section, uncomment and replace YOUR_MASTERADMIN_LOGIN with your player login, and add further logins for other players you want to grant all XASECO admin rights.
    2. In the <tmserver> section, replace YOUR_SUPERADMIN_PASSWORD with the password you chose for SuperAdmin in dedicated_cfg.txt (TMF step 6a above) but do not change the SuperAdmin login itself.
    3. The <port> field should contain the same XMLRPC port number you chose in dedicated_cfg.txt (TMF step 6d above), default 5000.
    4. IP is your own machine again, so that option is okay too.
  7. Edit xaseco/adminops.xml:
    1. In the <admins> section, uncomment and replace YOUR_ADMIN_LOGIN with an admin's login, and add further logins for other players you want to grant partial XASECO admin rights. Or leave the <tmlogin> entry commented out if there are none.
    2. In the <operators> section, uncomment and replace YOUR_OPERATOR_LOGIN with an operator's login, and add further logins for other players you want to grant XASECO operator rights. Or leave the <tmlogin> entry commented out if there are none.
  8. Edit xaseco/dedimania.xml if you want to use the Dedimania world records system:
    1. In the <masterserver_account> section, replace YOUR_SERVER_LOGIN and YOUR_SERVER_PASSWORD with the <login> and <password> values from your dedicated_cfg.txt file.
    2. Also, replace YOUR_SERVER_NATION with your 3-character nation abbreviation.
    3. Instead of the password you can also enter the community code for your server which can be obtained by using the server login/password on this page for TMF.
    4. To disable Dedimania support, remove or comment out the chat.dedimania.php and plugin.dedimania.php entries in plugins.xml.
  9. Start the XASECO system:
       cd ~/xaseco/
       ./ (or Aseco.bat)
    You won't see output, but logfile.txt should contain something like the following:
    [XAseco] PHP Version is 5.3.x on Linux
    [XAseco] Load settings [config.xml]
    [XAseco] Load admin/ops lists [adminops.xml]
    [XAseco] Load banned IPs list [bannedips.xml]
    [XAseco] Load plugins list [plugins.xml]
    [XAseco] Load plugin [plugin.localdatabase.php]
    [XAseco] Load plugin [plugin.rounds.php]
    [...snip plugins...]
    [XAseco] Load plugin [jfreu.plugin.php]
    [XAseco] Load plugin [mistral.idlekick.php]
    [XAseco] Try to connect to TM dedicated server on timeout 180s
    [XAseco] Try to authenticate with username 'SuperAdmin' and password 'PASSWORD'
    [XAseco] Connection established successfully!
    [Local DB] Load settings file
    [Local DB] Try to connect to MySQL server on 'localhost' with database 'aseco'
    [Local DB] MySQL Server Version is 5.1.56-log
    [RASP] Cleaning up unused data
    *-*-*-*-*-* RASP is running! *-*-*-*-*-*
    |...Loading Settings
    |...Checking database structure
    |...Structure OK!
    |...Calculating ranks
    [04/xx,xx:11:17] Load default style [styles/DarkBlur.xml]
    [04/xx,xx:11:17] Load default admin panel [panels/AdminBelowChat.xml]
    [04/xx,xx:11:17] Load default donate panel [panels/DonateBelowCPList.xml]
    [04/xx,xx:11:17] Load default records panel [panels/RecordsRightBottom.xml]
    [04/xx,xx:11:17] Load default vote panel [panels/VoteBelowChat.xml]
    [04/xx,xx:11:17] ************* (Dedimania) *************
    [04/xx,xx:11:17] * Dataserver connection on Dedimania ...
    [04/xx,xx:11:17] * Try connection on ...
    [04/xx,xx:11:18] Webaccess ( send: deflate, receive: gzip
    [04/xx,xx:11:18] * Connection and status ok! :)
    [04/xx,xx:11:18] * NEWS (Dedimania, 08/05): news
    [04/xx,xx:11:18] ------------- (Dedimania) -------------
    [04/xx,xx:11:18] Load stats panel [panels/StatsNations.xml]
    [04/xx,xx:11:18] Load auto timelimit config [autotime.xml]
      XASECO v1.1x running on
      Game   : TmForever United - Stadium - TimeAttack
      Version: 2.11.26 / 2011-02-21
      Authors: Florian Schnell & Assembler Maniac
      Re-Authored: Xymph
    Begin Race
    [04/xx,xx:11:18] track changed [none] >> [Pro - 38~74~75~89~93]
    [04/xx,xx:11:18] currently no record on Pro - 38~74~75~89~93
    If you get an RPC Permission Error here, there is an XMLRPC port mismatch or the dedicated server isn't running (anymore).
  10. To start & stop your XASECO on Linux more easily, you can use this start-up script.
  11. Edit the configuration options to your liking, and restart XASECO. It should now be ready to manage tracks, receive players, and record... er... records. Congratulations. :-)
Finally, to run another server on the same machine:
  1. Basically follow the same steps above, but use a second user account (e.g. "tmf2"), another new server login/password in dedicated_cfg.txt, a separate server name, a second set of ports (e.g. 2351, 3451 and 5001), a new database (e.g. "aseco2"), optionally a second MySQL account (e.g. "tmf2"), and the corresponding updates in localdatabase.xml and config.xml.
  2. Don't use symbolic links in the GameData/ directory tree (e.g. to symlink the tracks from the first server to the second one), as the TMF server will crash without an error message.
And for the last time, read the readme's and tutorials completely for a more thorough understanding of the entire setup.

Copyright © 2007-2023 – Frans P. de Vries <>             Last updated 29-Jan-2022