I'd like to present this tutorial for all those who want to setup a dedicated server on their local or remote (if available) machine for trackmania Origian, Sunrise and Nations ESWC
For those who are very new to this, I'd first like to take this oppertunity to forward you to http://en.tm-wiki.org/wiki/Dedicated_server to read about the function summary of what this dedicated server is.
1. download the dedicated server zip or tarball.
Here is the forum topic where we provide mirrors to download the dedicated server:
viewtopic.php?t=1350
2. extract the contents of these files into the representative folders for the game(s) you own.
c:\program files\trackmania original
c:\program files\tmsunrise
c:\program files\trackmania nations eswc
advanced users:
If you are going to run the trackmania dedicated server on a remote host or it's dedicated folder on your home machine, you can simply let the zip or tarball be extracted to it's dedicated directory called tmdedicatedserver. It's Preferred for the case of this tutorial to have it into your root. . but the directory structure of your local game has to be preserved in that map (as in , the gamedata dir with it's tracks and matchsettings)
I sometimes reffer to c:\YourDedicatedServerDir in green, this means that you must determine yourself where trackmaniaserver.exe is located.
3. Inspect that you have dedicated.cfg (your server configuration file) + trackmaniaserver.exe or: the file trackmaniaserver + a .sh script file for linux users. These files need to be available in the server dir. Then in the subdirs gamedata/tracks/matchsettings/ there should be directories with files that will have the match settings and challenges definition for your game. and your challenges (maps) should be in the /gamedata/tracks/challenges subdir of the server directory. Also do not forget the file DedicatedTrackMania.TrackMania.gbx file which has to be locaded inside the GameData subdir.
All these files are included in the package but the mentioned files are the skeleton selection of files that have to be available in order to run the server. (You can disregard/delete everything else in the server package unless you are going to experiment with application building, )
-
Note: everything included in this totorial applies to both trackmania legacy server and TMU server except for the following changes:
- dedicated.cfg for TMU is now stored in c:\yourserver\GameData\Config.
-
4. If you want to immediately have your custom maps ready for the server, launch your game, (client, not the server) (in this example: trackmania original but it will be similar in other trackmania games) go to internet, create server,

5. Edit your desired server mode and time. click OK (right below) and start choosing the maps you want to have in your server:
The thing is that when you selected all your maps you can save it into a txt (xml) file. choose the save function below

6. save it as a txt file to your liking (you dont have to add the .txt) just save it as you want without the extention. in this example stunt.txt

Thats what you need to do in the game...
7. You may close down your game.. or alt tab out of it to the desktop.
the file will now be located in c:\program files\trackmania original\gamedata\tracks\matchsettings (for trackmania original) and c:\program files\tmsunrise\gamedata\tracks\matchsettings (for trackmania sunrise) or trackmania nations c:\program files\trackmania nations eswc\gamedata\tracks\matchsettings
the file basicly contains all the server's advanced settings and map settings you selected.
NOTE: If you have a dedicated server directory of it's own: move the maps and directories over starting from the challenges folder. You need to move it over to the corresponding challenges map in the dedicated server directory :
c:\program files\trackmania original\gamedata\tracks\challenges (with all it's subdirs and maps) has to be moved to
c:\tmdedicatedserver\gamedata\tracks\challenges (with all it's subdirs and maps)
8. now open the map where you have your trackmaniaserver.exe in, press ALT, while dragging the file to your desktop with the mouse
9. Rename the short cut to "server start" or something like that
10. choose the properties of the shortcut (rightclick the icon > select properties
It will look like this:

(actually the first field called target initially contains "c:\YourDedicatedServerDir\trackmaniaserver.exe" but that needs to change because you must learn the server that you saved a maps file, and to teach it your server name and other basic server settings that are contained in the file dedicated.cfg in the map where your server is located.
11. The short cut (target) properties will eventually have to look like this
TrackMania Original:
"C:\program Files\TrackMania Original\trackmaniaserver.exe" /game=original /dedicated_cfg=dedicated.cfg /game_settings=MatchSettings/stunt.txt /internet
TrackMania Sunrise:
"C:\Program Files\tmsunrise\trackmaniaserver.exe" /game=sunrise /dedicated_cfg=dedicated.cfg /game_settings=MatchSettings/stunt.txt /internet
TrackMania Nations ESWC
"C:\Program Files\trackmania nations eswc\trackmaniaserver.exe" /game=nations /dedicated_cfg=dedicated.cfg /game_settings=MatchSettings/stunt.txt /internet
Dedicated folder (or remote host)
"C:\tmdedicatedserver\trackmaniaserver.exe" /game=original /dedicated_cfg=dedicated.cfg /game_settings=MatchSettings/stunt.txt /internet
NOTE: in case you use a dedicated folder server, you must ofcourse determine what game you are going to use, either it's nations, sunrise or original.
I color the things that are important to teach the server some things, caus you might have chosen another file: like myotherserver.cfg to quickly be able to create other types of servers via the command line structure without having to reconfigure everything in dedicated.cfg or matchsettings files for the maps and game mode...
NOTE: the dedicated.cfg or what ever you want to call it later must be found in the same dir that your trackmaniaserver.exe resides in (to keep things simple), the matchsettings at least in the gamedata/matchsettings dir of your dedicated server repertoire, the challenges in the tracks/challenges dir or subdir etc ...
also when creating the shortcut, Pay attention to the "'s .
in target: only the executable "C:\YourDedicatedServerDir\trackmaniaserver.exe" is between ''s , the rest (configuration) is outside the ''"s ....
if you are finally ready, click ok for the properties and view your shortcut to the server on the desktop,
12. Let's breakdown the functions here... We did:
/game=original Choose what game you want to play, original, sunrise or nations
/dedicated_cfg=dedicated.cfg configuration of the basic server settings
/game_settings=MatchSettings/stunt.txt sets the server according your created and saved ingame server settings
/internet (says to the server that it has to be an internet server), but you can join it as lan user as well...
Do you see the file with all the maps that in my playlist specification above? It is the file you saved in-game (step 6) and is saved in
c:\program files\TrackMania Original\gamedata\tracks\matchsettings (for trackmania original) or c:\program files\tmsunrise\gamedata\tracks\matchsettings (for trackmania sunrise) c:\program files\TrackMania Nations ESWC\gamedata\tracks\matchsettings (for trackmania nations)
Again remember to move this file over to c:\tmdedicatedserver\gamedata\tracks\matchsettings when you use a sepparate dir for the server.
Note: In the shortcut, It's no error that the whole directory structure for the match settings isn't visible in the command line option.. The server will look in any directory you specify which is relative to the matchsettings directory, the hard coding of the server sees that as the "base" directory to put your matchsetting files in. Also later on when you see the specifications for the tracks within this match settings file, you'll see that the server will also think the "tracks" directory is the base dir from where you specify subsequent dirs where the tracks (challenge.gbx) files go..
For example when you have a file in c:\tmdedicatedserver\GameData\Tracks\Challenges\my challenges\mymap.challenge.gbx , then the server will only need the specification like this "challenges/my challenges/mymap.challenge.gbx
This is functional when you are going to place the dedicated server on a remote box with windows server or something like that..
so, remember your saved file from the in game menu ? (in this case its stunt.txt) but i color it because you can choose any name you want, this is just an example for you to interpret and do your own thing with...
so the relative designation for your file and map becomes MatchSettings/stunt.txt
13. Lets now inspect the dedicated.cfg in c:\YourDedicatedServerDir\
<?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>YourAccountName</login>
<password>YourPassWord</password>
<nation>USA</nation>
</masterserver_account>
<server_options>
<name>Nameless Stunt Server</name>
<comment>Comment Away!</comment>
<max_players>8</max_players>
<password></password>
<max_spectators>3</max_spectators>
<password_spectator></password_spectator>
<ladder_mode>forced</ladder_mode> // value between 'inactive', 'normal' and 'forced' (or '0', '1', '2')
<enable_p2p_upload>True</enable_p2p_upload>
<enable_p2p_download>True</enable_p2p_download>
<callvote_timeout>60000</callvote_timeout> // Time in whitch given percentage of votes must be reached (1.4.9 feature)
<callvote_ratio>0.5</callvote_ratio> // Set between 0 and 1. 0.5 represents that 50% of the users must vote to take action (1.4.9 feature)
<allow_challenge_download>True</allow_challenge_download> // Allow/dissalow download of maps (1.4.9 feature)
</server_options>
<system_config>
<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> // if you specify an ip adress here, it'll be the only accepted adress. this will improve security.
<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>
</system_config>
</dedicated>
In the event that you do not have a dedicated.cfg: save all starting from <?xml to </dedicated> to a file in the dedicated server root folder and name it dedicated.cfg (or if you have it, edit it. I have assigned collors to the things you (as the beginner) have to or can change.
NOTE: The systemconfig settings in blue should only be changed when your network environment and safety policy of a certain company requires that you use other privileged ports.. normally these settings should not be changed in a home environment or normal dedicated server operation.
THe only thing a beginner and home user without special network circumstances should change are the network connection type tags, they may alter the dls settings to LAN if they are using a cable modem and use a network card to connect to the internet.
Do leave everything between the <ystem_settings></system_settings> section as is and do not delete any value. As of version 2006-10-03, the server requires all tags to have at least the default configured value. Empty tags will result in bad input string values. Read the readme document for further info if you want to alther these values when you are in a specific network situation thet requres the server to bind to another ip, listen for clients on other ports etc...)
14. Now we have to do some things online ! In the case that you run a dedicated server voor TrackMania Original/sunrise : make a new login with your multi player key here: http://www.trackmania.com/dedicated/indexUk.php for trackmania original (you need your TMO key)
and http://www.trackmaniasunrise.com/dedicated/indexUk.php for trackmania sunris (you need your sunrise key)
The login and password fields from dedicated.cfg that I colored olive green are needed by the dedicated master server by nadeo. you first have to go there and create this login (its as if you would create a login for the game, but you need a secondery name that is not equal to your game login, to run a dedicated server..
Nations accounts are auto created by your specifications in dedicated.cfg
When you do not have a TrackMania Nations account yet, you can just fill in the master account , password and nation fields and the server will create this for you (hold in mind that you need to start with the /nations option command line. We talk about thise elsewhere in this tutorial.
In fact you are required to create a destination 3 letter country name for your account, otherwise your account will be created in the Austria tree (wich might be undesireble when you do not live there or not wish your server to be created there).
You can easily see what correct 3 letter designation your country has by going online and passing trough the "recommended server" window to the window "show more servers". There you can press the up icon so you can see all country tags. Make sure that you are in tree view mode and not in serverlist mode (done by the icon below the up icon)
You can make multiple logins if you wish but remember them and make sure you choose a login according to the title and spirit you want to give for your server.
After creation of the login, inspect your dedicated.cfg file again to match the rest of your basic server settings as you desire.
Take note that you have to inspect the masterserver settings, your server name, the comment, number of players, number of spectators .. Can you find these settings while inspecting the dedicated.cfg ?
The server mode and playtime are saved in your playlist file. You have selected these when you chosen maps inside the game's map saving function.
As a side note, to correctly manage track types and modes I want to say something. In TrackMania Nations, it doesn't matter if you chose Rounds or Time attack, both modes are closely related and don't requre your track layout to be so much difference. But you need to be aware that in TrackMania Original and TrackMania sunrise, you can't expect that stunts and laps tracks will really work in time attack and rounds mode. Both psychologically, tactically and technically they can be so different that if you run your server in rounds mode with stunt type tracks they will be annoyed. A stunt map is too tactical to be played in rounds. So try to arrange the maps carefully when you want to use them in certain modes.
Anyway, lets go on.
15. now it is time to doubleclick your server shortcut that you created in step 11. doubleclick it, you'll see this: (if you configured everything well)

See the maps roll out and players connect and disconnect

The server will now be visible in your game in both lan and internet.. You can join as lan user!
You might wonder what all other things in de dedicated server are all about. (like superadminpassword. but it is not really for you (the local home user). The thing is that the dedicated server is an executable that serves but actually doesn't do another thing than the things you send to it, either by commandline configuration or XMLRPC. The last one is for advanced user that want to run their server on a remote box with windows server and the dedicated server executable will be able to receive xmlrpc commands trough a php script or via a software program.
Hope the basic things are clear to you now and.. happy serving. There have been lots of requests for this and it'll be nice to see the internet list populated by dedicated servers!
And remember that there are great tools in development to make this tutorial obsolete really. But if you nevertheless read it you will have a basic understanding on how the server work. If you can build a server manually like I describe it. Your can use the tools out there in a very relaxed way because you will know what the feature represents .
Happy serving!