Log inSign up

Your own OpenTTD multiplayer map on a VPS

Download the official OpenTTD Linux build and the free OpenGFX graphics set into a dedicated openttd account, start the binary once with ./openttd -D to create its config, then set the server name, game type and passwords. A small systemd unit keeps the map running around the clock, and opening port 3979 over TCP and UDP lets friends join by address or through the public server list.

Topic: Game and voice servers · Tested on: Ubuntu 24.04 and 22.04, Debian 12 and 13 · Updated 2026-12-03

Which server size and system suit OpenTTD?

OpenTTD is light: one fast vCPU and 1 to 2 GB of memory carry a normal map with a handful of companies. The simulation runs on a single thread, so per core speed matters far more than core count, which is why the High Frequency line fits this game well. Very large maps (4096 tiles a side) with thousands of vehicles push memory and CPU up, so step to a bigger plan if you plan maps of that scale.

This guide uses Ubuntu 24.04, Ubuntu 22.04, Debian 12 or Debian 13 with a sudo user. If you have not logged in yet, follow your first SSH session and then SSH keys and hardening. Update the base system first:

sudo apt update && sudo apt full-upgrade -y
sudo apt install -y curl unzip xz-utils tmux

For a wider look at hosting games on our servers, the game servers overview lists the plan lines and cities.

Should you use the distribution package or the official build?

Use the official build. Multiplayer clients must run exactly the same OpenTTD version as the server, and players update their desktop clients quickly, while the Ubuntu and Debian archives usually carry an older release. You can see what the archive offers with:

apt policy openttd

If that version matches what your group plays, sudo apt install openttd openttd-opengfx works too, and the rest of this page still applies with the binary at /usr/games/openttd. Most groups prefer the generic Linux tarball from the project, which is what the next steps use.

How do you create the service account and download OpenTTD?

Create a locked account with no password and no sudo rights, so the game never runs as root:

sudo adduser --system --group --home /srv/openttd --shell /bin/bash openttd
sudo -iu openttd

As the openttd user, fetch the current stable release. Check the version number on the OpenTTD downloads page and set it in VER; the example below uses 14.1.

VER=14.1
cd /srv/openttd
curl -LO https://cdn.openttd.org/openttd-releases/$VER/openttd-$VER-linux-generic-amd64.tar.xz
tar -xf openttd-$VER-linux-generic-amd64.tar.xz
ln -sfn openttd-$VER-linux-generic-amd64 current
./current/openttd --version

The current symlink makes later upgrades a one line change. If --version complains about a missing library, run ldd ./current/openttd | grep "not found" and install the named package with apt from your sudo account.

Why does a headless server need OpenGFX?

OpenTTD refuses to start without a base graphics set, even in dedicated mode, because the game logic references sprite data. OpenGFX is the free set the project maintains. Place its tar file in the user data folder; OpenTTD reads it without unpacking:

mkdir -p ~/.local/share/openttd/baseset
cd ~/.local/share/openttd/baseset
curl -LO https://cdn.openttd.org/opengfx-releases/7.1/opengfx-7.1-all.zip
unzip opengfx-7.1-all.zip && rm opengfx-7.1-all.zip
ls

You should see opengfx-7.1.tar. Newer OpenGFX releases work the same way; adjust the number if the project has published one. The same folder structure holds save, scenario and content_download directories for maps and NewGRFs.

How do you configure the server name, passwords and game type?

Start the server once in a terminal so it writes its config files, then stop it with quit typed at its console:

cd /srv/openttd
./current/openttd -D
# wait for "Map generated, starting game", then type:
quit

The files now live in ~/.config/openttd/. Settings are split across three files: openttd.cfg for game settings, private.cfg for names, and secrets.cfg for passwords. Edit them with the server stopped. The lines that matter most:

# private.cfg
[network]
server_name = Example Rail Club

# secrets.cfg
[network]
server_password = choose-a-join-password
rcon_password = long-random-admin-secret

# openttd.cfg
[network]
server_game_type = public
server_port = 3979
max_clients = 16
max_companies = 8
autoclean_companies = true

[gui]
autosave = monthly

server_game_type takes local, public (listed on the server browser) or invite-only (joinable by invite code or address). Leave server_password empty for an open server. The rcon secret lets an admin send console commands from inside a game client with rcon long-random-admin-secret "status". Map size, climate and economy options sit under [game_creation] and [difficulty]; the simplest way to tune them is to save a game locally with the settings you like and load that save on the server.

How do you keep OpenTTD running with systemd?

A unit file starts the map on boot, restarts it after a crash and keeps the process under the unprivileged account. Leave the openttd shell with exit and create the unit as your sudo user:

sudo tee /etc/systemd/system/openttd.service >/dev/null <<'EOF'
[Unit]
Description=OpenTTD dedicated server
After=network-online.target
Wants=network-online.target

[Service]
User=openttd
Group=openttd
WorkingDirectory=/srv/openttd
ExecStart=/srv/openttd/current/openttd -D
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now openttd
systemctl status openttd --no-pager
sudo ss -lntup | grep 3979

The ss output should show the openttd process listening on 3979 for both TCP and UDP. To continue an existing map instead of generating a new one at each start, add -g /srv/openttd/.local/share/openttd/save/club.sav to the ExecStart line, and save the running game regularly with rcon long-random-admin-secret "save club".

Which firewall ports does OpenTTD use?

Players connect on 3979, over TCP for the game stream and UDP for discovery. Open only that port; the admin port 3977 should stay closed unless you run an external bot and know you need it.

sudo ufw allow OpenSSH
sudo ufw allow 3979/tcp
sudo ufw allow 3979/udp
sudo ufw enable
sudo ufw status verbose

If you manage nftables by hand instead, the same two rules fit into the ruleset shown in firewall rules. From a desktop client, choose Multiplayer, then Add Server, and enter 198.51.100.24 (or [2001:db8:4f2a::24] over IPv6). A public server also shows up in the in-game list after a minute or two.

How do you upgrade OpenTTD without losing the map?

Save first, then swap the symlink. Old saves load in newer versions, but the reverse is not true, so keep a copy of the save folder before each upgrade.

sudo -iu openttd
VER=14.2   # the new stable number
cd /srv/openttd
curl -LO https://cdn.openttd.org/openttd-releases/$VER/openttd-$VER-linux-generic-amd64.tar.xz
tar -xf openttd-$VER-linux-generic-amd64.tar.xz
tar -czf ~/saves-$(date +%F).tgz -C ~/.local/share/openttd save
ln -sfn openttd-$VER-linux-generic-amd64 current
exit
sudo systemctl restart openttd

Tell your players to update their clients to the same number. For protection beyond these archives, the daily backups add-on copies the whole disk each day.

What should you check when players cannot join?

  • Version mismatch: the client shows a version error. Compare ./current/openttd --version with the client build.
  • NewGRF mismatch: clients need the same NewGRF files. With content download allowed they fetch them automatically; otherwise share the list.
  • Not in the public list: confirm server_game_type = public and that UDP 3979 is open, then read journalctl -u openttd -n 50 for registration messages.
  • High lag: watch the process with top. A single core at 100 percent means the map has outgrown the plan; move to a faster one with a larger plan.

Plans that fit this guide

Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.

All prices
PlanFits becauseSizeMonthlyOrder from
F1-2small maps and a few friends1 vCPU, 2 GB RAM, 64 GB NVMe$7.20/mo$43.20 for 6 months
F2-4large maps with many vehicles2 vCPU, 4 GB RAM, 128 GB NVMe$14.40/mo$43.20 for 3 months

Questions about OpenTTD dedicated server

Does the OpenTTD server need the original Transport Tycoon files?

No. OpenGFX, OpenSFX and OpenMSX are free replacements, and a dedicated server only needs a base graphics set such as OpenGFX.

How many players fit on a small plan?

Player count is rarely the limit. The number of vehicles and the map size drive CPU use, so a modest map with a dozen people runs on one fast vCPU, while huge networks need more speed.

Can I run two maps on one server?

Yes. Give each one its own config directory with -c /path/to/openttd.cfg, its own port and its own systemd unit, and open both ports in the firewall.

Where are autosaves stored?

In /srv/openttd/.local/share/openttd/save/autosave/. The autosave setting under [gui] controls how often the server writes them.

Can I give the server a name players can type?

Yes. Point an A record such as ttd.example.net at the server IPv4 address, as shown in DNS records, and players can enter that name instead of the IP.