You are on page 1of 18

Contents: 1. Introduction 1.1 What you need: 1.2 To get you underway 1.3 Getting the server 1.3.

2 Structure declaration. 2. Minimum File requirement (they are all provided in the package) needed to run the dedicated server: ------------------------------------------------------2.1. Starting your tmnations server in 1 2 3 (self contained micro tutorial) ------------------------------------------------------2.2 Inspecting TrackManiaServer. 2.3 The main configuration file dedicated.cfg 2.4 The matchsettings and playlist file 2.5 The Guestlist file 2.6 The Blacklist file 2.7 Track Files 3 directory structure awareness of the dedicated server: 3.1 Commandline parameter awareness of dedicated.cfg 3.2 Commandline parameter awareness of matchsettings/playlist files 3.3 configuring maps in match settings files and via commandline 4. Launching the server 4.1 All the command line options explained. 4.2 Creating an sh file for one-command launch of the server 5. Raw usage and command insertion via xmlrpc: 5.1 Managing your tracks at home and remotely... 6. Running record keeping scripts as daemon 7. Additional optional documents 8. finishing notes 8.1 Credits -----------------------------------------------------1. introduction Here's the tutorial for the linux usage of the trackmania dedicated server. It is verbose. I use lots of notes and side informations to also be able to appeal to those users who are using lots of windows in their life and less linux. Those users may be overwhelmed by the different nature of configuring a linux version of the dedicated server although the internal operation is exactly the same. For savvy users it's easy, but I'd like to proceed step by step, explaining the differences from windows as we go. At the same time I'd want you to get a good understanding of the server by providing info on how you can operate your server completely manual (without using software to set it up). In my oppinion, this is the best way of getting you acquaited with it's nature. Using additional scripts and management software will be super pleasent then. Because it relieves you from all manual work but you'll be able to do manual fine tunes to the essential configuration files without relying on setme-up software as well... 1.1 As in the windows tutorial (wich is a very condenset version to get started right away) I invite you to read http://en.tm-wiki.org/wiki/Dedicated_server to get introduced about what the TrackMania Dedicated server is befor going on with this tutorial. 1.2 This tutorial assumes though, that you use windows at home as work environment and linux as a remote host for your dedicated server. I guess this is quite normal because those who are serious trackmaniacs play it on a windows machine or windows emulators. I'm always happy to accept addendums to this tutorial for those who competely use linux to linux usage in the future.

1.1 What you need: 1.1.1: Linux (debian, Fedora Cores, ubuntu) (owned, or access as a user on shell providers for gameservers) 1.1.2 : If you use a firewall or the shell provider uses it, it needs to have ports freed for the server to correspond inbound and outbound with server-admin 1.1.3 : (remote connection ssh client for windows Putty. http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe A terminal that connects you from your home computer (windows) to the external linux box.(I assume that when you are using linux at your own home you dont need the verbose information on this tutorial and you use the ftp client of your choise) 1.1.5 An ftp client (if you get normal ftp with your server shell, ask your host if you do). 1.1.5a A psftp client (winscp for example) if you just get provided with ssh access without ftp for your username. This will provide gui interface for the special terminal ftp protocol that you have to use to easily upload and download files. 1.1.6 (servermanagement via windows) : servermania, tmweb), and internally (localhost) with records keeping software like Aseco or Fast) 1.1.7 allowance to use the php command as non admin (for raw commandline insertion) 1.1.8. wget command (this isnt critical but helps for streamlined operation of the installation of the server via your server terminal window. 1.1.9 nano or pico (text file editors that you hava to use to configure configuration files of the server and scripts you are going to use) 1.2 To get you underway I'd also want to give you the directive to always know that if you work on linux, every name of a file or dir is case sensitive so gamedata isn't the same as GameData, and if your username of /home/YourServer has caps, you need to take that into account when providing full or relative paths to the server. 1.2.1 I'll talk in this tutorial about a few things. sh and chmod are a few of them. 1.2.2 What is chmod: chmod is a directive to change the user rights of a certain file on a linux server. You need to understand that user rights are more on the foreground on a linux server and each file will have user rights for you (the owner) the group of users and "the public". Each of these 3 have 3 possibilities of acces. Write, Read, and execute. I'm not going to elaborate on it too much but you need to understand this, because some files on the linux server need to be executable and others don't. Normally this all works well when installing this dedicated trackmania server but you might run into situations (also described on this tutorial) where you need to manually setup a file as executable. I'm just going to tell you when this has to be (all I want to do here is make you understand why i'm including this section of notes) 1.2.3 What is SH ? SH's are scripts much like you would create a shortcut or batch file in windows. Only they are capable of very advanced stuff. Fear not, in the situation of the dedicated server you're not going to do anything complex with sh, just making a shortcut to run the dedicated server easier so you don't laways have to type the entire commandline configuration parameters. 1.2.4 What is tarball and gzip ? Tar creates tarballs just as much as you can compact several files and directories in one zip or rar package in windows. The above named compressions are mainly used in linux.

1.2.5 Kill ? In this tutorial you are sometimes required to use the kill command. To keep it simple, kill is just the equivalent of closing a program or terminating it in window. Only you have no window element to click on or a menu to choose so you need to use the kill command to terminate a process. 1.2.6 Processes. I sometimes let you use the ps command in linux. This (when you specify the username by typing ps -U yourserver) will present you with a list of processes that you are running from your system. It's prudent to check if theres programs running when you experience errors that have to do with connecting to an already existing program. So you may use the ps command to have a handy list ready to be able to see what thing you can kill (1.2.5). (For you smarties out there, never kill the bash process or you'll have to reconnect again) 1.3 Getting the server 1.3.1 If you use a remote linux server. (you managed to get a shell account for your server which is external and not on your computer). You need to have putty ready and installed. If you also want to do easy file transfers, use a windows psftp clint like winscp3. It can also be that your linux shell provider gives you normal ftp. Then you can just use a normal FTP client instead of the special one I proposed 1.3.2 Login to your linux box using ssh configure putty: set the ip of the server you connect to, set the connection type to ssh, set the custom port if the hoster provides this to you (standard is 22 but some hosters may provide you with a custom ssh port to connect to for security reasons). Make a name for your connection and save it into the putty configuration file for double click access Login with your provided username (in the case of the tutorial we are going to name it yourserver for further refference). Always replace yourserver in your mind with the name you own and put that in practical use. Now you are in your user directory (mostly that is /home/yourserver, the yourserver is the name given to you by the provider. There are 2 different versions of the server. One for the legacy trackmania games (Original, Sunrise, Nations) and one server is to server trackmania United games. (compatibility and networking evolution are a few reasons for this) So let's proceed by downloading the legacy server. Every difference with the legacy and the united server will be having an extra note to accentuate this difference. Make sure you're in your root folder /home/yourserver type: wget http://ds.bemaniacs.org/TmDedicatedServer_2006-05-30_legacy.tar.gz when it's ready type: tar -zxvf TmDedicatedServer_2006-05-30_legacy.tar.gz If you want to run a TMU server, it's almost the same but with another package and the directory structure will be somehow different. Below: you'll find out what's different in the example of the config files and the directory structure. For tmu: still go in your /home/yourserver dir and type wget http://ds.bemaniacs.org/TrackmaniaUnitedServer_2007-02-23.tar.gz tar -zxf TrackmaniaUnitedServer_2007-02-23.tar.gz

your server is now unpacked in the /home/yourserver dir, if you are to that directory the following structure should be present: /home/yourserver/Gamedata /home/yourserver/Gamedata/Config (tmu dedicated server only) /home/yourserver/Gamedata/Tracks /home/yourserver/Gamedata/Tracks/Campaigns /home/yourserver/Gamedata/Tracks/Challenges /home/yourserver/Gamedata/Tracks/MatchSettings 2. Minimum File requirement (they are all provided in the package) needed to run the dedicated server: /home/yourserver/TrackManiaServer /home/yourserver/GameData/DedicatedTrackMania.TrackMania.gbx (a child binary file needed by TrackManiaServer) /home/yourserver/dedicated.cfg (tmunited: /home/yourserver/GameData/Config/dedicated.cfg) optional: /home/yourserver/GameData/Guestlist.txt (auto created in tmunited: /home/yourserver/GameData/Config/Guestlist.txt) optional: /home/yourserver/GameData/Blacklist.txt (auto created in tmunited: /home/yourserver/GameData/Config/Guestlist.txt) /home/yourserver/GameData/Tracks/Campaigns/ subdirs and track files (*.Challenge.Gbx) file that are configured in: /home/yourserver/GameData/Tracks/MatchSettings/MatchSettings.txt (files are called different in legacy dedicated server and tmu dedicated server) go to your /home/yourserver/GameData/Tracks and type ls -s *gbx to see if the match settings and track files are there.As said befor, it's differnet in the dedicated server for legacy trackmania games and tmu. These track arn't exactly essential. You can always upload your own. That's why it's cool to have an ftp or the scp file transfer client. Nadeo packs some starndard file allong for you to be able to run the dedicated server right away. You can expand this list as you wis and we'll show you how you do that in this tutorial. 2.1. Starting a trackmania nations server in 1 2 3 You will find that when you unpack your server it will actually be ready to be launch a trackmania nations server. if every environmental variable is optimal (you use no firewall that blocks things, you unpacked the package to the right directory and unpacked all files in it, Only one thing stands between you and starting a dedicated server. 2.1.1. Trackmania nations auto adopts the settings you make in 2.1.2 automaticly and we still have to wait for the procedure with tmuntided. (please note that when you make servers with tmunited, you need a sepparate server version) 2.1.2 edit /home/yourserver/dedicated.cfg (tmu: /home/yourserver/GameData/Config/dedicated.cfg) (go to this dir and type nano dedicated.cfg). Search for <masterserver_account> <login>myaccount</login> <password>mypass</password> <nation></nation> </masterserver_account> Make sure that when you start a trackmania nations/tmu server that you organize your server within your nation's 3 letter abreviation.. in my case that would be BEL. choose your own country. this is very important. Save the entire file (without changing anything else) by hitting CTRL+X , then y for yes.

note: If you want to create other dedicated servers for TrackMania Original and TrackMania Sunrise, creating a dedicated server login can be done on https://www.trackmaniasunrise.com/dedicated/indexUk.php (for trackmania sunrise) http://www.trackmaniaoriginal.com/dedicated/indexUK.php (for trackmania original) ... 2.1.3 run the provided sh file... RunTrackmaniaNations.sh by typing sh RunTrackmaniaNations.sh There you go, go to the server with your game and go to your country serverlist and you will find it. Play a bit and then come back to your putty terminal and type: ps -U yourserver You'll see the id number of the TrackMania server process you are running from your user account: type kill -9 <idnumber> You must kill your server befor you want to proceed with this totorial... THis concluseds your quick server start tutorial. Ofcourse, this tutorial is vast and will try to give you an inside out look on how to operate your dedicated server on your own and with as little as help from external tools possible. This will enable you to get to know your dedicated server by heart. Further on we are going to inspect all nesecery files in depth: 2.2 Inspecting TrackManiaServer. Go into your root user folder (/home/yourserver) and you'll find this file. TrackManiaServer is the linux binary that you have to start. It's the dedicated server. You start it by typing ./TrackManiaserver + it's command lines (we will explain that below). For now, do not start the server right away because it will be idling and it doesn't know what to do without you giving it command line options. 2.2.1. note: (if you do it anyway, you'll have to kill it with linux commands befor yo move on. On linux, you stop a process by looking at it's process id instead of the filenime. Because it could be that several processes of other trackmaniaservers are running, you need to find out which one is yours by tyoing: ps -U yourserver (which is your user name you got on the shell), Then you'll see for example: *1890 Trackmaniaserver*. Type: kill -9 1890 and it will be killed and we can go back to business. 2.2.2. additional note: Normally when you unpack the dedicated server package to your dir, the TrackManiaserver will be set to being exacutable by you, the owner user of your home directory on the linux shell. If it isn't the case you need to change the userrights of the binary (not every binary on linux is executable perse, but even a text file on linux can be executable.. it's all in the user rights). 2.3 The main configuration file dedicated.cfg You'll find this file in /home/yourserver/ (For TmUnited You'l find it in the server's Configuration subfolder. (/home/yourserver/GameData/Config)

2.3.1 Edit the file by going to that directory and typing : nano dedicated.cfg. Save and exit by pressing CTRL+X and typing yes 2.3.2 Explanation of the settings. You should ONLY alter green or blue items if you wish, to need your custom server needs. Green items should be altered to personalize your server. Blue items are items that mostly work well in a standard situation but you may want to alter them if the situation requires it. More explanation in the comments of each function The settings you will be able to set in this file are : The first block of parameters (<authorization_levels>...</authorization_levels>) allows to define passwords for the three authorization levels.

SuperAdmin has all rights on the dedicated server. It can call any request, start and stop server, quit the application. It is recommended to change this password, and to not give it to any other person. This can be used manually (you'll learn more about this further on in the tutorial. Mostly scripts and remote administration software is going to make use of this. It's not the same as your game login that you'll have to fill in below. Admin can be used to manage a launched server, but cannot neither stop or start server, nor quit the application. Admin password can be given to a group of users to facilitate the remote management of a dedicated server. Mostly. Remote server management script's won't really use this directive. User can only access to 'get' requests,

The second block of parameters (<masterserver_account>...</masterserver_account>) is used for the connection to master server of the dedicated server. To allow the server to connect to master server, a login and password, that identify the dedicated server, must be specified. * For nations, the account is automatically registered when the server is launched if it doesn't exist. You need to specify a valid nation (in 3 letter standard nations naming convention) if you want your server to belong to the country of your choice) * For United, Sunrise and Original, this account has to be created beforehand. To do that, go to: http://www.trackmania.com/dedicated/indexUk.php or http://www.trackmania.com/dedicated/indexFr.php for a dedicated server account for TrackMania Original And go to: http://www.trackmaniasunrise.com/dedicated/indexUk.php or http://www.trackmaniasunrise.com/dedicated/indexFr.php for a dedicated server account for TrackMania Sunrise So for you who still use classic games like trackmania original/sunrise, This grey area of text is to mark the difference between modern server creation sites and these older versions. http://www.trackmania.com/tmu-dedicated For a TrackMania United dedicated server account. http://www.trackmania.com/tmf-dedicated

For a Trackmania United server that has the Forever addon) Here you must enter your multiplayer key of the game(s) you want to add dedicated server accounts for befor you can connect to the account creation site. After that, you can create/modify as many accounts you want for dedicated server. Game player accounts and dedicated server accounts are distinct. The login and password of a game player account can also be used in the 'masterserver_account' block, instead of parameters from a dedicated server account. But in this case the player cannot connect to Internet with his game, because his account is already used by the dedicated server. So, the block of parameters (<server_options>...</server_options>) defines the main parameters that will be used by the dedicated server. The settings are : name comment password password_spectator max_players max_spectators ladder_mode enable_p2p_upload enable_p2p_download callvote_timeout callvote_ratio allow_challenge_download autosave_replays connection_type server_port server_p2p_port xmlrpc_port name of the dedicated server (must be specified for the game to launch) comment of the dedicated server (a description where you can show the spirit of the server password needed at the connection to the dedicated server as player password needed at the connection to the dedicated server as spectator maximum number of clients that can join the server as player maximum number of clients that can join the server as spectator ladder mode. The mode can be defined between these values : 'inactive' (0), 'normal' (1), and 'forced' (2) value indicating if the server can upload custom data for P2P (0=False, 1=True) value indicating if the server can download custom data for P2P (0=False, 1=True) timeout for waiting for votes (value in milliseconds) ratio for accepting callvote. The value must lie between 0 and 1 (0=0%, 1=100%) value indicating if the server allows clients to download challenge (0=False, 1=True) Tells the server to save session/map replays or not. (False/True switch) type of network connection used. It defines the network limitations of bandwidth that can be expected by the dedicated server (see below for values) port number used by the server to listen the game connections port number used by the server to listen the peer-to-peer connections port number used by the server to listen to xmlrpc calls from administration software, external scripts such as rpc_tools or record keeping scrits like aseco.

should remote connections be accepted? xmlrpc_allowremote You can either set it to True or False, or specify an ip (or a symbolic name): in that case, only connections from that ip and localhost will be accepted. (note: security on this channel isn't very strong and hasn't been thoroughly tested) force_ip_address bind_ip_address guestlist_filename if an IP address is defined in this parameter, the dedicated server will publish it as its public address instead of autodetecting it. if an IP address is defined in this parameter, the dedicated server will bind to this ip and publish it as public ip, expect if force_ip_address is also specified. If nothing is specified inside this tag, the server will just use guestlist.txt if else, it will contain the name you specified. if an url is specified here, the dedicated server will check if there is an xml file that can be downloaded, and in this case if it's a blacklist file. If it is the case this blacklist will automatically loaded for this server If nothing is specified inside this tag, the server will just use blacklist.txt if else, it will contain the name you specified. When set to true, this feature will make the p2p system share local area ip's to all the connected users. Just leave empty for normal direct internet connection operations.

blacklist_url

blacklist_filename

use_nat_upnp

The values allowed for the 'connection_type' parameter are the followings : 'Modem_56K', 'DSL_128', 'DSL_512', 'DSL_1024_128', 'DSL_1024_256', 'DSL_2048_128', 'DSL_2048_256', 'DSL_2048_512', 'DSL_4096_256', 'DSL_4096_512', 'DSL_4096_1024', 'DSL_6144_256', 'DSL_6144_512', 'DSL_6144_1024', 'DSL_8192_256', 'DSL_8192_512', 'DSL_8192_1024', 'DSL_8192_2048', 'DSL_16384_512', 'DSL_16384_1024', 'DSL_16384_2048', 'DSL_16384_4096', 'LAN'.

On a shell from a gameserver hosting company you'll mostly set this to LAN. If you run a permanent linux computer at your home you'll have to determine yourself which adsl line you are using or if you are using a network card that is connected to a cable modem. Then you'll also set it to LAN 2.3.3 Below is the configuration file: <?xml version="1.0" encoding="utf-8" ?> <dedicated> <authorization_levels> <level> <name>SuperAdmin</name> <password>SuperAdmin</password> </level> <level> <name>Admin</name> <password>Admin</password> </level> <level> <name>User</name>

<password>User</password> </level> </authorization_levels> <masterserver_account> <login>YourLogin</login> <password>yourpassword</password> </masterserver_account> <server_options> <name>My (First) Dedicated Server</name> <comment>Server description</comment> <max_players>8</max_players> <password></password> <max_spectators>4</max_spectators> <password_spectator></password_spectator> <ladder_mode>normal</ladder_mode> <enable_p2p_upload>True</enable_p2p_upload> <enable_p2p_download>True</enable_p2p_download> <callvote_timeout>60000</callvote_timeout> <callvote_ratio>0.5</callvote_ratio> <allow_challenge_download>True</allow_challenge_download> <autosave_replays>False</autosave_replays> </server_options> <system_config> // tmu server only <connection_uploadrate>16384</connection_uploadrate> <!-- KBps --> <connection_donwloadrate>131072</connection_donwloadrate> <!-- KBps --> // end tmu dedicated server only commands <connection_type>DSL_16384_4096</connection_type> <server_port>2350</server_port> <server_p2p_port>3450</server_p2p_port> <client_port>0</client_port> <xmlrpc_port>5000</xmlrpc_port> <xmlrpc_allowremote>False</xmlrpc_allowremote> <bind_ip_address></bind_ip_address> <force_ip_address></force_ip_address> <use_proxy>False</use_proxy> <proxy_login></proxy_login> <proxy_password></proxy_password> <blacklist_url></blacklist_url> // tmu dedicated server only (leave blank to keep standard values described in this tutorial) <guestlist_filename></guestlist_filename> <blacklist_filename></blacklist_filename> <use_nat_upnp></use_nat_upnp> // end tmu only commands </system_config> </dedicated> 2.4 the matchsettings and playlist file The matchsettings and gamesettings file is the file that has 3 distinct sections of configuration.it can have any name as long as you configure it with the same name in the command line option /game_settings=filename.txt when you launch the server. THe 3 different fields of items that can be configured are

- the game settings (the mode of the game, chat time, match duration settings etc) - the filter settings (sets if the playlist of maps has to be shuffled or not - the playlist of the hosted tracks (challenges) on the server at one side. You should ONLY alter green or blue items if you wish, to need your custom server needs. Green items should be altered to personalize your server. Blue items are items that mostly work well in a standard situation but you may want to alter them if the situation requires it. More explanation in the comments of each function Edit the file by going to the directory /home/yourserver/GameData/Tracks/MatchSettings and type : nano allraces.txt (standard name). Save the changes you make and exit by pressing CTRL+X and type y for yes 2.4.1 Explanation of the settings: The first block of parameters (<gameinfos>...</gameinfos>) defines the match settings that will be used by the dedicated server. The settings are : game_mode chat_time rounds_pointslimit rounds_usenewrules timeattack_limit team_pointslimit team_maxpoints team_usenewrules laps_nblaps laps_timelimit game mode used between Rounds (0), TimeAttack (1), Team (2), Laps (3) and Stunts (4) chat time value in milliseconds points limit for rounds mode value indicating if new rules are used for rounds mode (0=False, 1=True) The new rules will only give 1 point to the winner... time limit in milliseconds for time attack mode points limit for team mode number of maximum points per round for team mode value indicating if new rules are used for team mode (0=False, 1=True). The new rules will only give 1 point to the winner. number of laps for laps mode to drive time limit in milliseconds for laps mode (if specified other than 0, players have a limited time to complete a laps session.

The filter section lets the server make the playlist behave specificily , (and to filter out specific types of connection tmunited) Other blocks (<challenge>...</challenge>) describe all the challenges that will be loaded by the dedicated server. Each block specifies the filename of a challenge. Filenames can be defined either by an absolute path or by a relative path to the '(PATH)\GameData\Tracks' directory. (tm united only) Is_solo : not known yet (tm united only) is_hotseat : not known yet (tm united only) is_lan: (lets the server have a LAN connection while started with /internet in the command line configuration (tm united only) is_internet : (lets the server have an Internet side connection if configured as /lan in the command line.

<random_map_order>..</random_map_order> : shuffle the list of challenges when the playlist is loaded. if not set, keep the playlist in the specified order. The last block of configuration settings is the playlist. (<challenge>...</challenge>) describes all the challenges that will be loaded by the dedicated server. Each block specifies the filename of a challenge. Filenames can be defined either by an absolute path or by a relative path to the '(PATH)\GameData\Tracks' directory. as further specified in chapter 3. 2.4.2 Here is the configuration file. All things that are different for the TrackMania United dedicated server are indicated <?xml version="1.0" encoding="utf-8" ?> <playlist> <gameinfos> <game_mode>1</game_mode> <chat_time>10000</chat_time> <rounds_pointslimit>50</rounds_pointslimit> <rounds_usenewrules>0</rounds_usenewrules> <timeattack_limit>300000</timeattack_limit> <timeattack_synchstartperiod>0</timeattack_synchstartperiod> <team_pointslimit>5</team_pointslimit> <team_maxpoints>32</team_maxpoints> <team_usenewrules>0</team_usenewrules> <laps_nblaps>5</laps_nblaps> <laps_timelimit>0</laps_timelimit> </gameinfos> //tmu only <hotseat> <game_mode>0</game_mode> <timeattack_limit>5</timeattack_limit> <rounds_count>5</rounds_count> </hotseat> <filter> <is_solo>0</is_solo> <is_hotseat>0</is_hotseat> <is_lan>1</is_lan> <is_internet>1</is_internet> <sort_index>200</sort_index> // Original hybrid dedicated server for legacy game...(+ tmu) <random_map_order>1</random_map_order> </filter> // repeat the structure below with each additional challenge you want to add... <challenge> <file>Campaigns/Nadeo/United/Race/Snow/Normal/snowC1.Challenge.Gbx</file> </challenge> // end repeatable structure </playlist> 2.5 The Guestlist file A guestlist file "guestlist.txt" can be created in the map /home/yourserver/GameData, and will be automatically loaded by the server.

A player on the guest list is allowed to enter into the server in any case, even if there is no player slot left, and without needing to specify the password. 2.5.1 In the trackmania United dedicated server. This file is automaticly created in the /home/yourserverr/GameData/Config map 2.5.2 The guestlist file is an xml file as follows : <?xml version="1.0" encoding="utf-8" ?> <guestlist> // repeat structure for each additional login you want to add <player> <login>Login1</login> </player> // end repeatable structure </guestlist> Edit the file by going to the directory /home/yourserver/GameData/ (/home/yourserver/GameData/Config for tmunited) and type : nano guestlist.txt. Save and exit by pressing CTRL+X and type y for yes 2.6 The Blacklist file A blacklist file "blacklist.txt" can be created in the map /home/yourserver/GameData, and will be automatically loaded by the server. A player on the black list will never be able to enter onto the server. 2.6.1 In the trackmania United dedicated server. This file is automaticly created in the /home/yourserverr/GameData/Config map 2.6.2 The blacklist file is an xml file as follows : <?xml version="1.0" encoding="utf-8" ?> <blacklist> // repeatable structure for adding additional logins to be blocked <player> <login>Login1</login> </player> // end repeatable structure </blacklist> Edit the file by going to the directory /home/yourserver/GameData/ (/home/yourserver/GameData/Config for tmunited) and type : nano blacklist. Save and exit by pressing CTRL+X and type y for yes 2.7 Track Files A track file or Challenge (in nadeo terminology) is placed in /home/yourserver/GameData/Tracks or one of it's subdirectories. If you unpacked the dedicated server package, you'll find several tracks in the Campaigns subdirectory, where Nadeo places a selection of their solo race tracks. This is done and preconfigured in the packed matchsettings file so you can start your server right away without configuration (explained in the beginning of this document) A challenge file looks like this mymap.Challenge.Gbx, and must be configured in the playlist editor. (chapter 2.3.2) 3 directory structure awareness of the dedicated server:

The trackmania dedicated server is aware of it's own directory structure in a specific way. It will read specific data from specific base dirs which are essentially subdirs of it's own root. For itself it reads data from relative directory starting with its own root when you are configuring files. Here is the way it reads infos 3.1 Commandline parameter awareness of dedicated.cfg dedicated.cfg is always in the map /home/yourserver (tmunited: /home/yourserver/GameData/Config) and is just called by the parameter /dedicated_cfg=dedicated.cfg. The file can actually be named anything, but the location always has to be the one mentioned above 3.2 Commandline parameter awareness of matchsettings/playlist files The dedicated server's basedir for playlist/game options files is /home/yourserver/GameData/MatchSettings. So when you call it with a commandline parameter, you call /game_settings=MatchSettings/yourplaylist.txt. Yet, when you are in a situation where you want to save the playlist with command codes to the server (discussed later) you don't need to provide any MatchSettings direcitory, just the filename (or else the server will create new subdir of MatchSettings called MatchSettings 3.3 configuring maps in match settings files or via commandline Maps should at all times be placed in /home/yourserver/GameData/Tracks/.or subdirectories You'll have to configure either by commandline or in your playlists that the map is in the Challenges dir: /home/yourserver/GameData/Tracks/Challenges/mymap.Challenge.Gbx will become <file>Challenges/mymap.Challenge.Gbx</file> in a matchsettings file As you can gather, the base dir for reading maps is:/home/yourserver/GameData/Tracks , and Challenge is an organised subdir. For Nadeo maps the dir right under Tracks is Campaigns. 4. Launching the server The dedicated server has to be run with several commandline options in order for it to know - what filename and content of it's base configuration is (standard = dedicated.cfg in the GameData/ dir (home/yourserver/GameData/Config for tmunited) - which playlist/gamesettings file - if it has to be an internet or lan server - (optional) if it has to be verbose on the display of received xmlrpc commands (good for debugging) - (optional) if it has to write log files or not. An example launch line (normally when you untar your package correctly and follow the steps of 'launching your server in 1 2 3", this command will make a server instantaneously... ./tmdedicated /internet /dedicated_cfg=dedicated.cfg /game_settings=MatchSettings/allraces.txt 4.1 All the command line options explained. In summary all the options, that can be specified to the dedicated server, are the followings: /dedicated_cfg=config_fil Specify a configuration file to use. (standard the file is called dedicated.cfg e and is located in /home/yourserver/Gamedata (tmunited:/home/yourserver/GameData/Config

/game_settings=MatchS Specify a game settings file to use. standardly this is allraces.txt located ettings/settings_file in /home/yourserver/GameData/Tracks/MatchSettings. /internet Specify to the server that it must connect to the master server, in order to be an Internet server.(or you use /internet, or /lan to specify if this is an internet server or only publishes itself via lan network. Display the XmlRpc requests the dedicated server receives. /verbose_rpc The server will only display the name of the XmlRpc command and some parameters. (optional) Display the whole contents of the XmlRpc requests the dedicated server receives. (optional) (linux) Doesn't detach the process. (you'll have to press CTRL+C to terminate and free up the command prompt (optional) disables the creation of "GameLog.txt" and "ConsoleLog.txt" (tmunited: in the /home/yourserver/TmUnited (optional) Masterserver account (overrides the value from the config_file) (optional) Masterserver account (overrides the value from the config_file) (optional) Masterserver account (overrides the value from the config_file) (optional) name of the server to create. (overrides the value from the config_file) (optional) password to join the server. (overrides the value from the config_file) (optional) loads the "checksum.txt" instead of recomputing it. *DO NOT USE* if you run several servers in the same directory! (optional) Forces the public ip address to this value (overrides the value force_ip_address from the config_file) (optional) Choses the ip to bind to, and sets the public ip to this value. (you still can use /forceip to chose a different public ip) If the server is not "live" (with a map loaded and ready to receive player), exit. Most notably, if there is a configuration error that prevent the server to be successfully launched, quit instead of staying in the "waiting for rpc commands" state.

/verbose_rpc_full /nodaemon /nologs /login=xxx /password=xxx /nation=xxx /servername=xxx /serverpassword=xxx /loadcache /forceip=xxx(:xx) /bindip=xxx(:xx)

/autoquit

4.2 Creating an sh file for one-command launch of the server Much as in windows' shortcut creation or *.bat creation process you can create an executable text file that launches the server + it's command line with a single command. Go to your base user directory in /home/yourserver type: nano startserver.sh just type your desired command line configuration and exit nano by pressing CTRL+X , and

answer y for yes to the save file question Now, your one-command server start file will work in two ways. You can type: sh startserver.sh and it will start, but you can also shorten this even by using ./startserver.sh For this to work you need to make your start script hash executable. type: chmod 504 startserver.sh now type: ./startserver.sh and your server will start 5. Raw usage and command insertion via xmlrpc: If you just started your first linux trackmania server and want to start playing with it by adding, removing or inserting tracks or changing playlists, you can do this with rpc_utillities by slig. It's a php script that enables you to manually manipulate the server by entering it's own Methods by commandline. You can always find a list of the available methods in the trackmania server package which you extracted to your user dir and thus contains a listmethods htm page for you to inspect. So, get rpc_tools: wget http://ds.bemaniacs.org/rpc_utilities.tar.gz for tm-united: wget http://kheops.unice.fr/slig/tmu/xmlrpc/rpc_utilities.zip for united: type wget http://ds.bemaniacs.org/rpc_utils_united.tar extract: tar -zxvf rpc_utilities.tar.gz (tar -zxvf rpc_united_utils.tar) and the rpc utillities dir will be created with the needed files. type: cd rpc_utilities (rpc for the tmunited version) type : nano sendcmd.php and check if the following commands are having the correct values: For united: nano config.php // usually you run the script from the same host and you needn't change this. Leave it be $ip="localhost"; // this port numberhas to correspond with <xmlrpc_port></xmlrpc_port> in dedicated.cfg (chapter 2.3.2) of your dedicated server in case you changed it there $port=5000; // these items has to correspond with the SuperAdmin level tag in dedicated.cfg. NEVER change the <name> tags of these levels in the , // configuration screen, or else you'll break the system. the password of the SuperAdmin level needs to correspond with the password here. So, // change only <password> (or pass, as you can see below) $user="SuperAdmin"; $pass="SuperAdmin"; so if this is as you desire, save the nano session by hitting ctrl+x then type y now the sendcmd.php scrit is able to correspond with the trackmania dedicated server, try by typing: php sendcmd.php GetVersion You'll see the server respond. Do you want to know if there are players playing without connecting to your server ? type: php sendcmd.php GetPlayerList 100 0 If you want to insert and show that new challenge that you just uploaded to your /home/yourserver/GameData/Tracks/Challenges, and type: php sendcmd.php InsertChallenge Challenges/mynewchallenge.Challenge.Gbx (read 5.1 to find out how you can do this easily from your windows home computer)

If you want to save the new playlist conditions with your new map included type: php sendcmd.php SaveMatchSettings yourplaylist.txt (where yourplaylist.txt must be the same as the one you configure with /game_options= in the commandline parameters to start the server) Ofcourse you can go on and on watching stuff happen via command line, and feeling l33t because you can do everything this way but it's just contraproductive this way to spend serious time managing your server. That's why I advice to get servermania, learn to use it as a remote control for your linux server from your home.. or if you are that inclined, you can use tmweb on a webserver (which can be your own linux box) as long as it can connect to the xmlrpc port on the server which has to be enabled and configured in dedicated.cfg as well as in your desired admin software's options. For more details on this read the propper manuals of the desired software you want to use. The option to enable remote xmlrpc commands from such a client for dedicated.cfg is <xmlrpc_allowremote>True</xmlrpc_allowremote> . If set to a port number (like 7300, it will listen on that port for xmlrpc commands and you need to configure this same port on the administration software you are going to use. 5.1 How to remotely quickmanage your tracks. You know when you play your game at home, use EasyTM to download new tracks from tmexchange, they are conveniently put inside your game's Tracks directory structure. You could create playlists ingame. I describe this in my basic tutorial here: http://www.tmforum.com/viewtopic.php?t=674 . Yet, software like servermania and tmweb is limited in managing your tracks remotely from your windows pc because the rpc commands ofcourse cannot send your tracks that you use on your home pc. Thats why you'll have to do this part manually but there are tools to help you out. As creating playlists in game might become a bit of a hassle, you can also use a tool called TrackMania Matchsettings Manager. It can be found here: http://www.tmforum.com/viewtopic.php?t=3198 This is a windows program is dedicated to managing your local tracks inside playlists, but you can also make it aware of what your remote (relative) linux directory is. So if you add tracks locally, you can save the matchsettings file , knowing that it will work on your linux server. For example. I have my tracks locally in c:\Program Files\TrackMania United/GameData/Tracks/Challenges. I want to make sure that when I upload my directory via ftp (which is included in the software we are discussing here) that the software saves track playlists in the matchsettings file in the correct relative location (/Challenges/ExampleTrack.Challenge.GbX) . In the remote field, you state /Challenges (mind the caps, I want to help you remember that this is very important when you upload to a linux server). If you save your ftp settings in the provided tab, and you syncronize your server track maps with your local directory you want to use to manage new tracks at home, you're ready to go. Read the readme for the application to find out other things about the software. Rightnow it doesn't support the scanning of subdirs just yet so it's maybe usefully organize all your server hosting tracks in the Challenges directory (to keep things simple) So now you are a true admin of your own dedicated server and know how it opperates, it's time to reveal that you can also run record keeping scripts like aseco or Fast on your server. It works the same way on linux as it does on window, only on windows you have the advantage of having it started in a commandbox, minimize it and let it run. In linux : this is done a bit differently especially for users who are connecting to an external box in a datacenter or a shell that they may use for game serving purposes , which is not located at their home.

6. Running record keeping scripts as daemon aseco can be downloaded here : http://www.tmbase.de/en/downloads/ 6.1 This tutorial will not explain in full how to configure this software. You can use the readme's from the desired package and find out how to configure stuff. Just know that remote xmlrpc ports (for example: in the config.xml of aseco) have to be matching those you set in dedicated.cfg and read other instructions carefully! Now back to business.As far I know, aseco and the liks have no detach feature built in to them. Unlike the dedicated server that frees your command line again after starting up , php scrits have to be equipped by a .sh file (that you run with sh myfile.sh) in order to let the process detach and allow you to use the command prompt.so you can't just put off your terminal, go to sleep and let these scripts run like the server does. As you can find out in the aseco package, there's such a sh file included. (it's a bit comparable with windows .bat files but for linux).So if you run aseco.sh after configuring the package, it will start up nicely but you can't really see what's going on because everything is routed to /dev/null (this is linu'x limbo if you will) log off your terminal and see aseco running on your dedicated trackmania server ingame! if you want the process to quit, use the following command: ps -U yourserver (where yourserver is the login and directory name you got with your shell when you got it from the hoster, or made yourself if you own the box) You see the "php" process running and an id nummer in front of it: type kill -9 <idnumber> to terminate the process. 6.2 If you DO want to see processing data of scripts like aseco you can do that and still log of your server without loosing aseco by using the screen command. befor starting aseco, type: screen You'll have another prompt which acts a bit as a new dosbox in windows, only you don't really see it but it's a "second prompt". (if you would type exit at this point you would be back at the first prompt) So now: go to the aseco dir and type php aseco.php and see the console writing messages. Now if you would just exit your terminal software, Aseco would quit allong with it. But we just want this screen session to stay active and still use the first command line: Press CTRL+A, then CTRL+D and you jump from prompt 2 (that has aseco running) back to prompt 1. Now you can work further. If you quit your terminal session with the linux box and you come back later you could just reconnect to the second prompt also by typing : screen -r To end the second screen with aseco all together just go to the second prompt, exit aseco there with ctrl+C and type exit 7. Additional optional documents There are a few other documents in the server package which you (if you are a developer of record keeping scripts) can use to determine all internal commands that you can provide to the

server in your records website system for example. The files provided are in html format: 7.1 ListCallbacks.html contain all callbacks that can be used as responses to your script's requests 7.2 ListMethods.html contains all the methods your script can send to the server for record keeping results, knowing the players and much much more. 7.3 Readme_Dedicated.html is the explanation html file containing explanations about all the dedicated server functions. Some of this text is transferred to this tutorial to make you aware of the functions you absolutely need to start a server. The dedicated server will also create a DefaultSystemConfig.Gbx and a Checksum.txt file. DefaultSystemConfig.Gbx is used internally to be a substitute for the real file on a game's installation. Normally on a windows computer, videocard settings and soundconfiguration settings are read from this. checksum.txt is generated to manage all sizes and designations of cache files. The Cache (/home/yourserver/GameData/Cache) will hold all custom skins, 3d models and other data from players who connect to the server.Just don't mind these and leave them be. 8. Finishing notes Ok, to finish this off. What i can tell you about using software like servermania or tmweb is, that, as a windows user you're really good with servermania, but if you are using linux yourself and you want to use tmweb as software (cause servermania doesn't exist for linux), read their documentation carefully and you'll be away in no time. if you are a windows user or a user who can't run servermania but also want to use tmweb remotely, you need ofcourse to find a webhoster that allows mlrpc ports to go out their firewall, otherwise it will be a sitting duck. So in case you find such a webhosting company, always protect tmweb base dir with a pasworded entrance in a .htaccess file,. This will protect you from people who want to abuse your tmweb software to do nasty stuff with the server. You can make such a password protect directory script here and put it inside a .htaccess file on your tmweb dir. <patronizing mode> I know some of you who are new would like to get underway with all this and you'd love to get your teeth in all this sooner than yesterday, but first you'll have to sit back and read all documentation on a server package. This totorial is to get you underway with the commands, but you need to also read the readme's with the software , client... cause there's al ot of information there and it helps to make you aware of how the structure is organized in the dedicated server software and all surrounding tools. This way you'll have a happy time configuring your software </patronizing mode> Happy linuxTmServing! 8.1 Credits: - Stephan "BLaHiTiS" Vandenborn (writer of this document) - Xavier "XBX" Bouchoux (programmer of the dedicated server + provider of option descriptions in this document) - All Nadeo and all the community who make this document worhty to spend time on and thus: run their dedicated server as a pro!

You might also like