Dedicated server

Dedicated server window

A dedicated server is a OpenTTD network game Server that does not have a local client taking part in the game. A dedicated server can run in the background on a computer.

Contents

Starting a dedicated server

Run the OpenTTD executable using the -D (capital D!) Command line option.

To load a specific save file, add -g savename.

In Windows

Method 1:

Method 2:

In Linux

You can also start openttd with -f option. It means that the process will run in the background, but no console will be available. All output will be sent to the file openttd.log. You can display the log with tail : tail -f openttd.log to follow events.

In OS/2

In Mac OS X

In Docker.io

Configuring the server

There are 3 ways to change the game options:

Available Tools:

Change the network settings in the Network section of Openttd.cfg:

Controlling the server with rcon

Configure the dedicated server to accept rcon commands:

Example: rcon_pw x8na7f

Connect to the server as a client:

Example: rcon x8na7f "kick 5"

Installing online content

Online content (NewGRFs) can be added to the server from the console using the content command. This is preferable to manual installation, because it includes dependencies and updating.

content update

Wait until "Content server connection closed" is printed in the console.

content state [filter]

This will list all content that matches filter. If you omit the filter, it will list all content on the server.

content select 2947
content download

Note: This will not activate the content, you will need to modify the game settings to use it.

Loading a game

In the dedicated server window (or with rcon):

Example: openttd.exe -D -g "scenario/echo.scn".

Automatically start/stop and save your game

If you do not want to run docker: Run your dedicated server in ubuntu/debian you can download and install a init.d script You will get the following functions:

For more functions, install guide and download, visit: https://bitbucket.org/frodus/openttd-init

With a ready-made docker container you get a tested and working environment for openttd. In ubuntu 14.04 or newer you can run: sudo apt-get install docker.io and then read documentation on the following url https://registry.hub.docker.com/r/bateau/openttd/ Mind that this is a pre-configured virtual machine and packaging is done by 3rd party.

See also