In this manual I present two scenarios of an typical Maniaplanet Dedicated Server installation. There are more possibilities then
just these two, but i can not handle all of them. You could also use a VirtualBox on your Windows computer
and the VirtualBox simulates a computer which runs Linux (e.g. Ubuntu). On that you can install the Linux variant of a Maniaplanet dedicated server.

Scenario No.1: Hosted in a data center (24/7)

You have a so called dedicated server which is running
Linux and is located inside of a data center and it is available 24/7 from the internet.

This is the default scenario for this manual.

Scenario No.2: Hosted at home

You want to install the Maniaplanet Dedicated Server on your computer which is running Windows and is located at your home.
All steps required an extra handling, files or tools are marked with @home.

WAMP environments @home

Tools

If you have already installed a text editor which can handle utf8 files correct, then you do not need Notepad++ (the included Windows Notepad can not handle it!).
WinSCP is only required if you want to transfer the Maniaplanet Dedicated Server and UASECO on your dedicated server inside the data center.

To make the foreign players able to connect to your Maniaplanet dedicated server, you have to open some ports
in your firewall.

If you want to run the Maniaplanet Dedicated Server and UASECO on a computer that is located at your home,
then you probably have a router over that this computer is connected to the internet. In this case you have to
forward traffic at the listed ports below to the local IP of your computer on that the Maniaplanet dedicated server
and UASECO are running on.

Required ports

Server port 2350 UDP and TCP incomming and outgoing traffic

P2P port 3450 UDP and TCP incomming and outgoing traffic

HTTP port 80 and 443 TCP and UDP incomming and outgoing traffic (mostly for the Maniaplanet Dedicated Server to communicate to the MasterServer)

Do not open the XML-RPC port 5000 to the internet, because this is only for local communication between the Maniaplanet Dedicated Server and UASECO!

If you want to have more then one Maniaplanet Dedicated Server on one computer, then you have to increase the
Server, P2P and XML-RPC port, e.g. to 2351, 3451 and 5001 and so on.

You have to create a server account at your Maniaplanet Account Manager, login with your PlayerLogin and PlayerPassword.
Later we need the ServerLogin and ServerPassword of that server you have created.

To be able to receive Planets by donations from players or to pay out Planets by e.g. Records-Eyepiece for the ranks 1 till 3 after each map,
you have to transfer an amount of Planets from your player account to the just created Maniaplanet Dedicated Server account.

Click on Edit right from the just created Maniaplanet Dedicated Server account and then enter an amount of planets, I recommend an amount of 1000 Planets:

Please create a folder on your harddrive, in this manual we use C:\ManiaplanetServer\. In these folder
we will install the Maniaplanet Dedicated Server , UASECO and the Uniform Server ZeroXIII (only @home).

Create a subfolder in C:\ManiaplanetServer\ with the name GameServer, then a path C:\ManiaplanetServer\GameServer\ should exists now.

Create a subfolder in C:\ManiaplanetServer\ with the name uaseco, then a path C:\ManiaplanetServer\uaseco\ should exists now.

PHP

Setup PHP

PHP normally use different ini-files for the API (e.g. CLI, Apache...), so you have to find which php.ini your php-cli is using.

You can simply find it by using the command php -r 'echo php_ini_loaded_file();' in a console, that could output something like this: /etc/php/5.6.33/php-cli.ini.

Open /etc/php/5.6.33/php-cli.ini and search for openssl.cafile, if it is not found then add openssl.cafile=/etc/php/5.6.33//cert.pem to it, or does it not contain any value,
then change it to openssl.cafile=/etc/php/5.6.33/cert.pem.

Move the downloaded cert.pem to C:\ManiaplanetServer\UniformServerZeroXIII\core\php71\cert.pem.

Dedicated Server

Installing the Maniaplanet Dedicated Server

reaby wrote a very detailed and good documentation on how to install the Maniaplanet dedicated server, which can be found at the official Maniaplanet forum.
So if you get stuck somewhere in here, you can try to look for a solution there (and please let me know where you got stuck).

You have to setup the Maniaplanet Dedicated Server to run in the <game_mode> "Script" and <script_name> to TimeAttack.Script.txt,
also you have to declare which <title> the Maniaplanet Dedicated Server should use.

I prefer to have a simple filename for the startup file for the Maniaplanet Dedicated Server, so I use the ServerLogin as part of the filename.
With this you can see easily which Maniaplanet Dedicated Server it is.

Replace YOUR_SERVER_LOGIN with the <masterserver_account><login> from C:\ManiaplanetServer\GameServer\UserData\Config\dedicated_canyon.txt.

The parameter /title has to be the same as in the C:\ManiaplanetServer\GameServer\UserData\Maps\MatchSettings\maplist_canyon.txt and C:\ManiaplanetServer\GameServer\UserData\Config\dedicated_canyon.txt, so it is TMCanyon@nadeo.

The parameter /game_settings has to be the MatchSettings file relative from C:\ManiaplanetServer\GameServer\UserData\Maps\, so it is just MatchSettings\maplist_canyon.txt.

The parameter /dedicated_cfg has to be the filename C:\ManiaplanetServer\GameServer\UserData\Config\dedicated_canyon.txt, without the path C:\ManiaplanetServer\GameServer\UserData\Config\, so it is then just dedicated_canyon.txt.

If you do not want the @home scenario, then you can also delete the ManiaPlanetServer.exe and RunSrvTM.bat file too.

UASECO

Installing the UASECO server controller

In this part of this documentation we install the server controller USAECO, this will store the informations for Records, Players,
Maps and so on, and let you control several things at the dedicated Server.

If the folder C:\ManiaplanetServer\uaseco\newinstall\dedicated-server\ does contain a folder which name matches the release date of the Maniaplanet Dedicated Server then
you have to copy all the files:

Copy the contents of C:\ManiaplanetServer\uaseco\newinstall\dedicated-server\RELEASE_DATE into the folder C:\ManiaplanetServer\GameServer\UserData\Scripts\ and override all the files.

Replace RELEASE_DATE with the release date of the Maniaplanet Dedicated Server.

Replace YOUR_DEDICATED_PORT with your setup from UserData\Config\dedicated_canyon.txt at <system_config><xmlrpc_port>.

Replace YOUR_SUPERADMIN_PASSWORD with your setup from UserData\Config\dedicated_canyon.txt at <authorization_levels><level><password> from the SuperAdmin.

Replace YOUR_PLAYER_LOGIN with your player login. You can add more then one MasterAdmins if you want, just duplicate this line.

Replace DATABASE_LOGIN with the mysql user for the database uaseco you created above.

Replace DATABASE_PASSWORD this with the mysql password for the database uaseco you have set above.

Replace DATABASE_NAME this with the mysql you set above (e.g. uaseco).

Replace PATH_TO_DEDICATED_SERVER this with the full path in where the file ManiaPlanetServer is located after you have uploaded it to your dedicated server.
For @home the path is C:\ManiaplanetServer\GameServer\.

Replace YOUR_MAIL_ADRESS with a working mail address.

Replace MAP_IMAGES_PATH with an full path in where the images of the maps will be stored. Make sure your HTTP Webserver handles this folder.