Docker image for simple or customizable Trackmania Nations/United Forever server.
Go to file
Hendrik Boll f70a456a18 added custom playlist support 2019-09-28 13:25:49 +02:00
tmserver cleaned up file structure and filled .dockerignore 2019-09-28 12:13:08 +02:00
.dockerignore cleaned up file structure and filled .dockerignore 2019-09-28 12:13:08 +02:00
.gitignore general updates 2019-09-17 19:40:48 +02:00
Dockerfile added xmlstarlet to image 2019-09-28 12:24:32 +02:00
LICENSE Initial commit 2019-05-09 14:21:12 +02:00
README.md Update README.md 2019-09-28 13:10:42 +02:00
TODO.md Updated TODO.md 2019-05-12 15:03:08 +02:00
docker-compose.yml updated example docker-compose.yml 2019-09-28 12:08:11 +02:00
entrypoint-tmserver.sh added custom playlist support 2019-09-28 13:25:49 +02:00

README.md

docker-tmserver

Docker image for simple or customizable Trackmania Nations Forever server

How to use this image

docker run -e {required environment variables} -p {selected ports} fanyx/tmserver

There are several required environment variables that you need to set:

  - $SERVER_LOGIN               | Server account login
  - $SERVER_LOGIN_PASSWORD      | Server account password

Optional environment variables are:

  - $SERVER_PORT                | Port for server communications -> Default : 2350
  - $SERVER_P2P_PORT            | Port for peer2peer communication -> Default : 3450
  - $SERVER_SA_PASSWORD         | Password for SuperAdmin credential -> when left empty will be randomly generated
  - $SERVER_ADM_PASSWORD        | Password for Admin credential -> when left empty will be randomly generated
  - $SERVER_NAME                | Server name in ingame browser -> Default : "Trackmania Server"
  - $SERVER_COMMENT             | Server description -> Default : "This is a Trackmania Server"
  - $SERVER_PASSWORD            | If you want to secure your server against unwanted logins, set a server password

Running this image with docker-compose

I have a default docker-compose.yml included in this repository. You can adjust this file to your needs but running with docker-compose is more comfortable in general.

Configuring the Trackmania server

Without manual configuration the server launches with Nadeo's default config. This means round based driving.

Other configuration options are listed below:

  - $GAMEMODE | 0 (Rounds), 1 (TimeAttack), 2 (Team), 3 (Laps), 4 (Stunts) -> Default : 1
  - $CHATTIME | chat time value in milliseconds -> Default : 10000
  - $FINISHTIMEOUT | finish timeout value in milliseconds. 0 means classic, 1 means adaptive -> Default : 1
  - $DISABLERESPAWN | 0 (respawns enabled), 1 (respawns disabled) -> Default : 0

Gamemode : Rounds

  - $ROUNDS_POINTSLIMIT | points limit for rounds mode -> Default : 30

Gamemode : TimeAttack

  - $TIMEATTACK_LIMIT | time limit in milliseconds for time attack mode -> Default : 180000

Gamemode : Team

  - $TEAM_POINTSLIMIT | points limit for team mode -> Default : 50
  - $TEAM_MAXPOINTS | number of maximum points per round for team mode -> Default : 6

Gamemode : Laps

  - $LAPS_NBLAPS | number of laps for laps mode -> Default : 5
  - $LAPS_TIMELIMIT | time limit in milliseconds for laps mode -> Default : 0

Running a custom playlists

You can add tracks to a playlist in a simple way. Just provide a playlist.txt that contains every track in a certain format. Create a folder next to your docker-compose.yml, mount it as a volume to /opt/tmserver/playlist and put the playlist.txt in there.

The tracks for the server are stored relative to /opt/tmserver/GameData/Tracks. Creating your own playlist is as easy as specifying each track on a separate line in the playlist.txt adressed by its relative path to the Tracks folder.

Example:

Folder structure:

|--> docker-compose.yml
|--> ./tracks
|--> ./db-data
`--> ./playlist
   `--> playlist.txt

playlist.txt :

Challenges/Nadeo/C01-Race.Challenge.Gbx
Custom/mini01.Challenge.Gbx
Custom/SpeedxZxZ.Challenge.Gbx

Running custom tracks

You can run custom tracks by mounting a volume from where your tracks are stored to /opt/tmserver/GameData/Tracks/Custom.

In this example i am storing my tracks in ./tracks relative to the docker-compose file.

[...]
  tmserver:
    image: fanyx/tmserver:latest
    [...]
    volumes:
     - ./tracks:/opt/tmserver/GameData/Tracks/Custom
[...]