First of all, you should get some more maps (tracks) e.g. from http://tm.mania-exchange.com or similar and test them on your server. That is why the creation of the tracklist is being automated by file listing, “upgrading” the map list remains more easy with this guide then.
# adduser tm2 # su - tm2 $ mkdir TM2 $ cd TM2 $ wget http://files.maniaplanet.com/beta3/ManiaPlanetDedicated_2011-08-16.zip $ unzip ManiaPlanetDedicated_2011-08-16.zip $ vim UserData/Config/dedicated_cfg.txt
* change SuperAdmin, Admin, User password (not the name) in authorization_levels
* go to your player account and create a new dedicated server login, and add those credentials to the masterserver_account section (login and password).
* change the name of the server in server_options
* change the connection up and download rate in system_config section
* don’t change the ports, but keep them in mind for later firewall configuration
We will use our own tracklist for matchsettings (generated by a small perl script). Change dnscloud.txt to anything you want.
$ vim RunSrv.sh #!/bin/sh ./ManiaPlanetServer /game_settings=MatchSettings/dnscloud.txt /dedicated_cfg=dedicated_cfg.txt /title=TMCanyon
Now let’s create the sources for the automated generation of dnscloud.txt – to see an example how the config settings look like, check UserData/Maps/MatchSettings/Beta1.txt or similar. The folder is named like the tracklist txt we will be creating.
$ mkdir UserData/Maps/dnscloud
Now copy that perl script to somewhere applicable and adapt $maindir if you changed dnscloud from above.
$ vim UserData/Maps/MatchSettings/gen_maplist.pl
#!/usr/bin/perl -w my $maindir="dnscloud"; chdir "/home/tm2/TM2/UserData/Maps/$maindir/"; my @files=<*>; my $file; print "<?xml version="1.0" encoding="utf-8" ?> <playlist> <gameinfos> <game_mode>2</game_mode> <!-- 2 = TimeAttack --> <chat_time>10000</chat_time> <finishtimeout>1</finishtimeout> <allwarmupduration>0</allwarmupduration> <disablerespawn>0</disablerespawn> <forceshowallopponents>0</forceshowallopponents> <script_name>TMTimeAttack</script_name> <rounds_pointslimit>35</rounds_pointslimit> <rounds_usenewrules>0</rounds_usenewrules> <rounds_forcedlaps>0</rounds_forcedlaps> <rounds_pointslimitnewrules>5</rounds_pointslimitnewrules> <team_pointslimit>5</team_pointslimit> <team_maxpoints>6</team_maxpoints> <team_usenewrules>0</team_usenewrules> <team_pointslimitnewrules>5</team_pointslimitnewrules> <timeattack_limit>240000</timeattack_limit> <timeattack_synchstartperiod>0</timeattack_synchstartperiod> <laps_nblaps>5</laps_nblaps> <laps_timelimit>0</laps_timelimit> <cup_pointslimit>100</cup_pointslimit> <cup_roundsperchallenge>5</cup_roundsperchallenge> <cup_nbwinners>3</cup_nbwinners> <cup_warmupduration>1</cup_warmupduration> </gameinfos> <hotseat> <game_mode>0</game_mode> <time_limit>300000</time_limit> <rounds_count>5</rounds_count> </hotseat> <filter> <is_lan>1</is_lan> <is_internet>1</is_internet> <is_solo>0</is_solo> <is_hotseat>0</is_hotseat> <sort_index>1000</sort_index> <random_map_order>0</random_map_order> <force_default_gamemode>0</force_default_gamemode> </filter> <startindex>0</startindex>"; foreach $file (@files) { print " <map> <file>$maindir/$file</file> </map>"; } print " </playlist>";
Now it’s time to place your tracks into UserData/maps/dnscloud – after that run the script to generate a new config. Make sure that the filenames don’t contain special chars or white spaces. Windows doesn’t mind, but this is targetted against Linux.
$ cd UserData/Maps/MatchSettings perl gen_maplist.pl > dnscloud.txt
Now we need to make sure that all needed ports are opened in iptables – 2350, 3450 and 5000 for xmlrpc, all tcp and udp.
-A INPUT -p tcp -m tcp --dport 2350 -j ACCEPT -A INPUT -p udp -m udp --dport 2350 -j ACCEPT -A INPUT -p tcp -m tcp --dport 3450 -j ACCEPT -A INPUT -p udp -m udp --dport 3450 -j ACCEPT -A INPUT -p tcp -m tcp --dport 5000 -j ACCEPT -A INPUT -p udp -m udp --dport 5000 -j ACCEPT
Change to tm2 user again, cd into ~/TM2 and run the server.
$ cd ~/TM2 $ ./RunSrv.sh
If you are adding new maps, just re-run the steps on map list generation and restart the server (ps aux | grep ./ManiaPlanetServer and kill the pid, re-run the RunSrv.sh and watch out for future init scripts).
do i have to buy the game for each server that i would like to run?
no, you just create a dedicated server login from your players page, es mentioned in the guide.
“go to your player account and create a new dedicated server login, and add those credentials to the masterserver_account section (login and password).”
so buying just once, and creating dedicated servers associated with that account.
thx
I can’t seem to set this up, it can’t find the config file for some reason;
./RunSrv.sh
Starting ManiaPlanetDate=2011-08-16-xx_xx Svn=40595 GameVersion=3.0.0…
Initializing…
Loading system configuration…
…ERROR: No configuration file.
…Could not load the system configuration
Assert Failed in /media/nadeo/Nadeo/Games/GameEngine/source/GameCtnNetwork.cpp Line 230
=> ‘m_DedicatedSystemConfig.m_IsLoaded’ failed.
Loading cache…
…OK
Listening for xml-rpc commands on port 5000.
Trackmania server daemon started with pid=19483 (parent=19479).
./RunSrv.sh: line 3: /dedicated_cfg=dedicated_cfg.txt: No such file or directory
then make sure that the file is located where the game expects it – /UserData/Config
otherwise report a bug to maniaplanet.
So if i get all this.
how can i join this server from the list?
and how can i install the admin software foxcontrol?
Can you explain that?
or is there any installation guide in german fpr the TM2 Dedi Host setup?
this server remains located in vienna, austria as “dns cloud”. but it’s still in testing mode.
regarding foxcontrol – you should consult the various guides on the maniaplanet forums. i failed on the initial install, so i decided to implement manialive with plugins instead which is installed on various servers.
regarding german – i have no clue either. i prefer keeping guides in english as everyone can read and understand that in the first place.
upgrade to beta4 is described here – http://www.legendiary.at/2011/09/06/upgrade-trackmania-2-dedicated-server-to-beta4/
Hi, i got a problem with starting the server.
The log’s always saying:
Match settings file : MatchSettingsbeta1.txt
Loading match settings…
…ERROR: The playlist file does not exist.
…Could not load the match settings
Server not started: no Challenges available. Check your matchsettings!
Exiting…
I already tried all possibilities for the path to the matchsettings-file:
beta1.txt
MatchSettingsbeta1.txt
MapsMatchSettingsbeta1.txt
UserDataMapsMatchSettingsbeta1.txt
# or even
~TM2C_serverUserDataMapsMatchSettingsbeta1.txt
nothing changes the resulting error…
– running a Debian LTS root server
– already set permissions for file on “755”
– imported working files from WinSvr2008 root
Isn’t there any easy way to add new maps? I really can’t figure this out?
I haven’t really played TM2 in the past year, so this entry is outdated – but I have no idea if there are already better ways to do so.