How to setup a Maniaplanet Dedicated Server [Tutorial]

Moderator: NADEO

reaby
Posts: 934
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

How to setup a Maniaplanet Dedicated Server [Tutorial]

Post by reaby » 03 Feb 2018, 15:20

Last edited by reaby on 05 Apr 2018, 11:20, edited 6 times in total.

reaby
Posts: 934
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

1. Installing dedicated server and title packs you wish to run

Post by reaby » 03 Feb 2018, 15:20

1. Installing dedicated server and title packs you wish to run

You can get the latest dedicated server always here:
http://files.v04.maniaplanet.com/server ... Latest.zip

Unzip the file at directory for example c:\dedicated\maniaplanet\ on linux maybe /opt/maniaplanet/ is good, but it's up to you where to place the dedicated server files. On windows good rule is not to have spaces and use only alpha-numeric (a-z and 0-9) values on the directory name.

Next step is to just start the dedicated executable once. On windows just double click the ManiaplanetServer.exe on Linux you might type:

Code: Select all

./ManiaPlanetServer
It will not start yet properly, and you will get errors. Don't worry it's all fine, since we've not configured the server. This is though important, because it will generate additional directory structures which you'll need to complete the tutorial.

Next step is to download the title pack(s) you wish the dedicated to be run, in this tutorial I'm using stadium as example
and the file you need is: https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx
now place the file at: dedicated\UserData\Packs

Here is a list of the default title packs for your convenience:

Trackmania:
https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx
https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx
https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx
https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx

Shootmania:
https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx
https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx
https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx
https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx
https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx
https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx
https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx
https://v4.live.maniaplanet.com/ingame/ ... e.Pack.gbx

If you wish to run other title packs you have installed for the game --> you can get the title pack from your game's packs data folder:
C:\Users\*your username*\Documents\ManiaPlanet\Packs
Last edited by reaby on 31 Aug 2018, 13:40, edited 4 times in total.

reaby
Posts: 934
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

2. Install startup maps and configuring matchsettings

Post by reaby » 03 Feb 2018, 15:20

2. Install startup maps and configuring match settings

You need some maps and a match settings file to run dedicated. Unfortunately the dedicated server doesn't come with initial maps anymore... so you'll need to either create a map using in game map editor or download the map/maps you wish to play. A good place to get maps is Mania-Exchange where you find a good community to build and share maps also many server controllers allows you to install maps directly in game without restarting the server.

Since we're going to install Stadium title pack, click on the following link:
https://tm.mania-exchange.com/tracks/42034/stadium-a01 click on the download and place the file at dedicated\UserData\Maps

You can easily filter the search and so on.. and for shootmania head on to https://sm.mania-exchange.com/ to get your initial map(s)and for other trackmania maps: https://tm.mania-exchange.com

Next step is to get the default match settings file:

There used to be a default one at dedicated server, but since the title packs are now separated from dedicated server there is no default file anymore. Instead there's nice service by Nadeo to generate the default match settings file for any title pack available at in-game store.

You'll find the helper at:
https://www.maniaplanet.com/account/ded ... ers/helper

Login using your in-game account and fill in:
Search term:"Stadium" --> which should give popup for Trackmania2 Stadium

Here you'll find many different modes. Most commonly used game mode TimeAttack is the last entry. Now select and copy the contents at your clipboard (ctrl-a, ctrl-c)

Next open your favorite text editor, notepad++ or nano or whatever...
Then paste (ctrl-v) the contents to new empty file at editor.

Last thing here is still to add the downloaded map for the match settings.

Here's example for the map we downloaded:

Code: Select all

<map>
	<file>A01.Map.Gbx</file>
</map>
Good place to add your maps is just before the closing tag </playlist>
Let's keep that the last line and place the maps before that:

For clarity here is a full working example:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<playlist>
  <gameinfos>
    <game_mode>0</game_mode>
    <chat_time>10000</chat_time>
    <finishtimeout>1</finishtimeout>
    <allwarmupduration>0</allwarmupduration>
    <disablerespawn>0</disablerespawn>
    <forceshowallopponents>0</forceshowallopponents>
    <script_name><![CDATA[TimeAttack.Script.txt]]></script_name>
  </gameinfos>
  <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>
  </filter>
  <script_settings>
    <setting name="S_ChatTime" type="integer" value="10"/>
    <setting name="S_UseClublinks" type="boolean" value="0"/>
    <setting name="S_UseClublinksSponsors" type="boolean" value="0"/>
    <setting name="S_NeutralEmblemUrl" type="text" value=""/>
    <setting name="S_ScriptEnvironment" type="text" value="production"/>
    <setting name="S_AllowRespawn" type="boolean" value="1"/>
    <setting name="S_UseLegacyXmlRpcCallbacks" type="boolean" value="1"/>
    <setting name="S_WarmUpNb" type="integer" value="0"/>
    <setting name="S_WarmUpDuration" type="integer" value="0"/>
    <setting name="S_TimeLimit" type="integer" value="300"/>
  </script_settings>
  <startindex>0</startindex>
  <map>
	<file>A01.Map.Gbx</file>
   </map>
</playlist>
Then just save the file, usually it's named: "maplist.txt", but you can choose really whatever name you wish. This tutorial will use maplist.txt and this file is your match settings file.

:idea: Maps are relative to dedicatedserver\UserData\Maps. So you can have sub folders, so if you have maps on a sub folder, the syntax is:

Code: Select all

<map>
	<file>SubFolder\A01.Map.Gbx</file>
</map>
:!: On Linux use "/" as folder separator.
Last edited by reaby on 31 Aug 2018, 14:12, edited 6 times in total.

reaby
Posts: 934
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

3. Configure dedicated server

Post by reaby » 03 Feb 2018, 15:20

3. Configure dedicated server

You'll need dedicated server account to run dedicated, so head on to and create new dedicated server account to bottom of the page:
https://www.maniaplanet.com/account/dedicated-servers

Now you should have created a dedicated server account... Let's then configure dedicated server so we can run it:
go to "dedicated\UserData\Config\dedicated_cfg.default.txt" and copy it to "dedicated_cfg.txt"

You'll find section looking like this at the start of file:

Code: Select all

 	<masterserver_account>
		<login></login>
		<password></password>
		<validation_key></validation_key>
	</masterserver_account>
Fill in your dedicated account credentials here.

For clarity an example how to fill these files:

Code: Select all

 	<masterserver_account>
		<login>toto</login>
		<password>foobar</password>
		<validation_key>LOL</validation_key>
	</masterserver_account>
:idea: If you wish to enable planets (in-game currency) for the server account, fill your main account validation key too. You find the validation key with the initial registration email send when you purchased the game, in case you've lost the mail you can obtain new one at: https://www.maniaplanet.com/account/validation-code. Also you need to send some, say 1000 planets, to the dedicated server login, for this use the in-game mail to do so. You find in-game mail as following: open your buddy chat and click »-button to extend the options, here you find mail.

Next fill in the server name and optionally the comment:

Code: Select all

	<name></name>
	<comment></comment>
:!: You can disable p2p upload, if you wish to save some bandwidth from the server.
Depending on your connection speed: raise the connection limits, this helps the maps to change faster.

Code: Select all

<connection_uploadrate>10000</connection_uploadrate>		<!-- Kbits per second -->
<connection_downloadrate>10000</connection_downloadrate>		<!-- Kbits per second -->
Here you also can change the default ports.

:idea: If you run multiple servers on same machine change you need to define unique port for each new one. for example: 5000,5001,5002..
:!: If you run game on same machine as dedicated server, it's encouraged to change the ports +1 for this config.

Next you should check and open these ports at your firewall and/or if you have configured NAT at for home router then you need to assign port forward. You can search web for more info, just search for "port forward tutorial".

:!: Xmlrpc port (default: 5000) is used for server controllers. This port you don't need to forward usually, as it's used for local host usually.
If you setup server controller afterwards, this is the port you need to enter for the controller to work.

Code: Select all

<server_port>2350</server_port>
<server_p2p_port>3450</server_p2p_port>	
<xmlrpc_port>5000</xmlrpc_port>
:!: In case you wonder the title setting. You don't need the this setting at all since we'll use command line argument to override it. Usually you can just ignore this, but you can also remove the line from config.

Code: Select all

<title>SMStorm</title>
3.1 Ladder servers

There's something you need to know to enable your server for other than 0-50k ladder rank.
First check the ladder server rules here at forums: viewforum.php?f=459

Raising the ladder limits will cost you in-game currency named Planets, for new server owners the amounts can be quite big as seen below.
So you might want to ask your friends help with this. Here's the amounts for your reference:
0-60k: 10000 Planets
0-70k: 20000 Planets
0-80k: 40000 Planets
0-90k: 80000 Planets

Race Of Champions server:
0-100k: 80000 Planets

To apply this ladder limits, visit ladder server config at player page: https://www.maniaplanet.com/account/ded ... er-servers
First fill in the title pack, then it opens new view asking for: server login, ladder limit and finally you'll need your account validation key to complete (the same you used at config above).

To make dedicated server a ladder server you'll need to edit dedicated_cfg.txt and find following line:
(If for some reason you're missing this line at dedicated config, you should add it and the two additional lines at <server_options> section)

Code: Select all

<ladder_mode>forced</ladder_mode>

Add the two additional lines below:

Code: Select all

<ladder_serverlimit_min>0</ladder_serverlimit_min>
<ladder_serverlimit_max>70000</ladder_serverlimit_max>
Last edited by reaby on 31 Aug 2018, 14:10, edited 7 times in total.

reaby
Posts: 934
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

4. Start dedicated server

Post by reaby » 03 Feb 2018, 15:20

4. Start dedicated server

Detailed list of available command line options: https://doc.maniaplanet.com/dedicated-s ... mmand-line
To start server you'll need at minimum set: title, dedicated_cfg and game_settings
If you run other title packs than stadium, the titleId is usually same as file name without the extension: .Pack.GbX

At windows you can create a new file and call it "stadium.bat":

Code: Select all

echo off
ManiaPlanetServer /title=TMStadium@nadeo /dedicated_cfg=dedicated_cfg.txt /game_settings=MatchSettings/maplist.txt
if %errorlevel% NEQ 0 pause
On Linux you can use your favorite text editor, like "nano stadium.sh" to create needed starter file:

Code: Select all

#!/bin/bash
./ManiaPlanetServer /title=TMStadium@nadeo /dedicated_cfg=dedicated_cfg.txt /game_settings=MatchSettings/maplist.txt
On some systems you might need to add runnable flag for the filesystem, you can do it with chmod:

Code: Select all

sudo chmod +x ManiaPlanetServer
sudo chmod +x stadium.sh
On Windows: double click on the stadium.bat and you should have your dedicated server running.
On Linux: run the file:

Code: Select all

./stadium.sh
In case your dedicated server doesn't start, check the console log for more details:
You can find it at dedicated\Logs\

If you have tried to start multiple times, it's the the newest file or is in doubt just delete the folder and try once, then you have only one log at the folder.

:idea: If you need to see console-log in the actual console, add argument "/noDaemon" to the start line, this will help you troubleshoot easier.

In case you'll encounter an error, please check the documentation for more detailed view about the error:
https://doc.maniaplanet.com/dedicated-s ... ent-errors

Appendix: Known errors

Code: Select all

[YYYY/MM/DD hh:mm:ii] This account hasn't access to all needed packages.
[YYYY/MM/DD hh:mm:ii] Please wait...
[YYYY/MM/DD hh:mm:ii]...master server error: (125) This account does not have rights to perform this action.
[YYYY/MM/DD hh:mm:ii] Unable to buy ?????????.
This account does not have rights to perform this action.

[YYYY/MM/DD hh:mm:ii] ...ERROR: Load failed. Could not get access to '??????'.
[YYYY/MM/DD hh:mm:ii] Could not install or update the title's files...
When you see this error, please make sure you start the title pack once in game at your main account, as of the account you registered the dedicated server to. After you have gained access to the title pack at game, the dedicated starts to work normally :)
Last edited by reaby on 31 Aug 2018, 14:24, edited 11 times in total.

reaby
Posts: 934
Joined: 29 Dec 2010, 23:26
Location: Eastern Finland
Contact:

How to setup a Maniaplanet Dedicated Server [Tutorial]

Post by reaby » 03 Feb 2018, 15:29

Done.

To keep the tutorial clean and usable, please use dedicated server topic to ask any additional questions.

Post this thread for additional infos and tips on setuping.

User avatar
TMarc
Posts: 14536
Joined: 05 Apr 2011, 19:10
Location: Europe
Contact:

Re: How to setup a Maniaplanet Dedicated Server [Tutorial]

Post by TMarc » 04 Feb 2018, 16:08

Great, thanks for writing this, reaby :thx: :thumbsup:
maniaplanet forum global moderator

Link list with FAQ, Support, Wiki, Tutorials, Community activities, and much more.

System specs: Intel i7-970 12GB RAM, nVidia GTX 970, Creative SB X-Fi, 2xSSD

User avatar
Alinoa
Nadeo
Nadeo
Posts: 4190
Joined: 14 Jun 2010, 11:55
Location: France, Paris
Contact:

Re: How to setup a Maniaplanet Dedicated Server [Tutorial]

Post by Alinoa » 05 Feb 2018, 11:54

GG Reaby for this tutorial :clap: :thumbsup:
And thank you TMarc for having linked it in the thread useful links: viewtopic.php?f=264&t=25029&start=0 ;)
Ubisoft Support
Your Player Page

More information about maniaplanet, support, contents, community activities: useful links

ManiaPlanet technical documentation portal (Dedicated server, Mediatracker, ManiaLink, ManiaScript, Titles...)

User avatar
TMarc
Posts: 14536
Joined: 05 Apr 2011, 19:10
Location: Europe
Contact:

Re: How to setup a Maniaplanet Dedicated Server [Tutorial]

Post by TMarc » 05 Feb 2018, 12:49

You're welcome :thx:
But there is no need to thank me for that since adding the link is rather self-evident ;)
maniaplanet forum global moderator

Link list with FAQ, Support, Wiki, Tutorials, Community activities, and much more.

System specs: Intel i7-970 12GB RAM, nVidia GTX 970, Creative SB X-Fi, 2xSSD

prachijain
Posts: 2
Joined: 08 Mar 2018, 08:21

Re: How to setup a Maniaplanet Dedicated Server [Tutorial]

Post by prachijain » 05 Apr 2018, 09:07

Setting the Maniaplanet dedicated server is really helpful for me, thanks Reaby...

Post Reply

Return to “Dedicated Server”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests