SetupOpenTTD

How to Host an OpenTTD Server (Dedicated Server Guide 2026)

Host an OpenTTD dedicated server: openttd -D, openttd.cfg and secrets.cfg, port 3979 TCP and UDP, public listing, invites instead of company passwords, NewGRFs.

Updated Oct 3, 2026 · 7 min read

On this page

To host an OpenTTD server, install the same OpenTTD version your players use (15.3 is the current stable release), start it with openttd -D for a dedicated server, or openttd -D -g save/mygame.sav to load a save. Set server_name and server_game_type = public under [network] in openttd.cfg, and the passwords in secrets.cfg. Open port 3979 for TCP and UDP. A dedicated server started without -g makes a brand new map, so always load your save after a restart.

OpenTTD trains waiting at a busy electrified station with a footbridge over the tracks

Why run a dedicated OpenTTD server?

OpenTTD games are long. A good map runs for weeks of real time, and that only works if the game is available when the person who started it is not. A dedicated server holds up to 15 companies, lets several players share one company, lets others spectate, and can pause itself until someone joins. It is free and open source, and so is the server, which is the same openttd program with a switch.

What do you need to run an OpenTTD server?

OpenTTD runs on Windows, macOS and Linux, and the server needs no graphics card. Memory grows with map size and vehicle count.

Game RAM Notes
Friends map with a few companies 2 GB 256 to 1024 tile maps
Public server or a full 15 company game 4 GB Many clients and vehicles
Huge maps with heavy NewGRF sets 8 GB 4096 tile maps, thousands of trains

The server and every player must run exactly the same version. As of October 2026 the stable release is 15.3 (April 2026) and 16.0 is in beta. Pick one and have everyone install it from openttd.org or Steam.

How do I start an OpenTTD dedicated server?

  1. Download OpenTTD for your system. On a Linux server, the linux-generic-amd64 tarball unpacks into a folder you can run from.
  2. Make sure a base graphics set is installed (OpenGFX, in the baseset folder), since the server needs one even without a screen.
  3. Start a new random game:
./openttd -D
  1. Or load a saved game:
./openttd -D -g save/mygame.sav

The dedicated server has a console. Type help for a list of commands. On Linux, -f forks the server into the background.

Where are openttd.cfg and secrets.cfg?

OpenTTD looks for its config first in the folder you start it from, then in your personal folder: Documents\OpenTTD on Windows, ~/Documents/OpenTTD on macOS, and ~/.local/share/openttd or ~/.config/openttd on Linux. Savegames go in save, autosaves in save/autosave, and NewGRFs in newgrf, relative to that folder. The directory structure doc has the full search order.

Since version 12, passwords live in a separate secrets.cfg next to openttd.cfg, so you can share your main config without leaking them.

Stop the server before editing either file. OpenTTD writes its settings back to the config when it exits, so edits made while it runs are lost.

What goes in the [network] section?

[network]
server_name = Weekly Freight Co-op
server_game_type = public
server_port = 3979
server_admin_port = 3977
max_clients = 25
max_companies = 15
min_active_clients = 1
pause_on_join = true
Setting Default What it does
server_name none Name in the server list
server_game_type local public lists the server, invite-only hides it but allows invite codes
server_port 3979 Game port, TCP and UDP
server_admin_port 3977 Admin port for bots and tools
max_clients 25 Players and spectators connected at once
max_companies 15 Companies allowed
min_active_clients 0 Pause the game until this many players are in
pause_on_join true Pause while someone downloads the map

The default server_game_type is local, which is why a freshly started server never shows up in the public list. Set it to public, or type set server_game_type public in the console. Old configs may contain server_advertise and lan_internet, which current versions no longer use.

And in secrets.cfg:

[network]
server_password = trains4ever
rcon_password = a-long-random-string
admin_password =

Leave server_password empty for an open server. rcon_password lets an admin run console commands from their game client with rcon <password> "<command>".

What ports does an OpenTTD server use?

Port Protocol Purpose
3979 TCP and UDP Game traffic and server queries
3977 TCP Admin port, only if you use admin tools

Forward 3979 for both protocols. Since version 12, OpenTTD also connects servers through its Game Coordinator, so players with an invite code (it always starts with +) can often reach a server even when port forwarding is not possible. Direct connections are still the most reliable. See our port forwarding guide.

How do company passwords work now?

They do not. Company passwords were removed in OpenTTD 15.0. Instead, a company member invites other players from the Online Players window, and the server remembers who is allowed in each company, even across reloads. If an old guide tells you to set a company password, it predates 15.0.

How do I keep a game going across restarts?

This is the trap that catches most new server owners. A dedicated server started with plain openttd -D generates a brand new random map every time. Your company is not gone: the old game is still in save or save/autosave. Load it from the server console:

ls
load 3

ls lists the files in the save folder with numbers, and load takes a number or a file name. Before you stop the server, run save weekly-map so you have a named save to come back to. On your own machine, adding -g save/weekly-map.sav to the start command loads it automatically.

How do NewGRFs, AIs and game scripts work?

NewGRFs (vehicle sets, industries, graphics) go in the server's newgrf folder, AIs in ai and game scripts in game. You can also download them on the server from the BaNaNaS content service with the console content commands.

  • Choose NewGRFs before the game starts. Changing them on a running game can break vehicles and industries, so start a new map instead.
  • Players missing a NewGRF see a yellow dot next to the server. They can get it in game through NewGRF Settings > Find missing content online.
  • A red dot means a different OpenTTD version. That one has to be fixed by installing the same version.

How do players join an OpenTTD server?

  1. Install the same OpenTTD version as the server.
  2. Click Multiplayer, then Add Server.
  3. Enter the server address, for example 203.0.113.10:3979, or an invite code starting with +.
  4. Select the server, click Join Game, then join a company, start a new one or spectate.

The easy option: host it with GamezServers

Our OpenTTD server hosting runs the dedicated server for you. New servers install the current stable release. The Settings page sets the server name and writes the port into openttd.cfg on every start, and the OpenTTD and OpenGFX version settings choose what is installed. Set server_game_type = public yourself in openttd.cfg for a listed server. Our servers start with openttd -D, so after a restart, open the live console and load your latest save. SFTP and the file manager handle NewGRFs and saves, and one click backups protect a map you have spent weeks on.

Plan RAM Price a month
Starter 2 GB 4.99 USD
Standard 4 GB 9.99 USD
Pro 8 GB 19.99 USD

New customers get 50% off the first month on monthly plans, and players can split the bill. Moving a save over is covered in how to move an OpenTTD save to a server.

FAQ

What port does an OpenTTD server use?

3979 for both TCP and UDP. The admin port 3977 is only needed for admin tools.

Why doesn't my OpenTTD server show in the server list?

server_game_type defaults to local. Set it to public in openttd.cfg or with set server_game_type public in the console.

How many players can join an OpenTTD server?

Up to 15 companies, and 25 clients by default with max_clients. Several players can share one company.

Why did my OpenTTD server start a new map?

A dedicated server starts a fresh map unless it is started with -g and a savegame. Use load in the console to get your game back.

How do I password protect an OpenTTD server?

Set server_password in secrets.cfg while the server is stopped, or use the console, then share it with your players.

Skip the setup. Your own OpenTTD server.

$2.49USD first month

Then $4.99/mo. Just trying it? $1.25 for 3 days

Keep reading