Dedicated OpenTTD server for multiplayer transport tycoon — build rail, road, air, and sea networks with friends
Grab the automated bash script from GitHub to follow along with the video.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/gaming/openttd/openttd-ubuntu.sh
chmod +x openttd-ubuntu.sh
sudo bash openttd-ubuntu.sh
The script installs Docker, pulls the OpenTTD dedicated server image with OpenGFX graphics, and starts the container. The server is very lightweight (~100 MB) and runs on port 3979 TCP/UDP.
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/gaming/openttd/openttd-ubuntu.sh
chmod +x openttd-ubuntu.sh
sudo bash openttd-ubuntu.sh
Edit openttd.cfg to set server name, password, max clients, and map generation settings. Control whether the server is publicly advertised on the master server list.
# Edit server configuration
nano /opt/openttd/data/openttd.cfg
# Key settings in [network]:
# server_name = My OpenTTD Server
# server_password = yourpassword
# max_clients = 10
# server_advertise = true # list publicly
# pause_on_join = true # pause when a player connects
# Key settings in [game_creation]:
# map_x = 9 # 2^9 = 512 tiles wide
# map_y = 9 # 2^9 = 512 tiles tall
Open OpenTTD, go to Multiplayer, click Find Server to browse the public list, or use Add Server to connect directly by IP and port.
# Direct connect address
<your-server-ip>:3979
Use the server console via docker attach to manage the game. Admin commands include saving the game, kicking players, pausing, and changing settings without restarting.
# Access server console
docker attach openttd-server
# (Ctrl+P then Ctrl+Q to detach without stopping)
# Common console commands:
# clients - list connected clients
# kick <client-id> - kick a client
# ban <client-id> - ban a client
# save mygame - save the current game
# pause - pause the game
# unpause - unpause the game
# View logs
docker logs -f openttd-server
| Port | Purpose |
|---|---|
| 3979 TCP | Game traffic (client connections) |
| 3979 UDP | Server discovery and query |
OpenTTD is a free and open-source simulation game based on the classic Transport Tycoon Deluxe. Players build transport networks using trains, buses, ships, and aircraft to connect cities and industries, competing or cooperating to maximize profit. A dedicated server enables persistent multiplayer.
Self-hosting OpenTTD allows a persistent cooperative or competitive transport empire that runs 24/7. Friends can join at different times, contribute to shared companies or compete with their own, and the game world continues to develop even when not all players are online.
OpenTTD uses TCP and UDP port 3979 for game connections and UDP port 3978 for LAN advertisement. Open both TCP and UDP on port 3979. The admin port (default 3977) should be firewalled from public access.
Alternatives include the public OpenTTD server browser, simutrans (another open-source transport sim), and single-player OpenTTD. Self-hosting provides a persistent world with your own rules and NewGRF configuration.
Avoid self-hosting OpenTTD if you only play occasionally with one other person — the built-in multiplayer works fine. Self-hosting is best for persistent community servers or groups who want ongoing games across many sessions.
PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.
OpenTTD theoretically supports up to 255 simultaneous players. In practice, large maps with many players require more server resources due to pathfinding and simulation complexity. Community servers regularly run with 20 to 50 active players. A modest VPS with 2 cores and 2 GB RAM handles most use cases.
NewGRFs are graphics resource file modifications that add new trains, vehicles, industries, objects, and terrain types to OpenTTD. Download GRF files from the in-game content downloader or the OpenTTD bananas content service. Place them in the data directory and configure them in the game settings before starting a new map.
Yes. Multiple players can join the same transport company and control it together. Each company has an optional password — share it with your co-op partners. All players in the same company share funds and can build, delete, and manage each other's transport infrastructure.
By default, yes — the game simulation continues. Configure pause_on_join or min_active_clients in openttd.cfg to pause the game when nobody is connected, or when fewer than a minimum number of players are present. This prevents the game clock from running ahead while all players are offline.
Yes. Use the console command newgame or load a new scenario save. The server configuration, NewGRF set, and network settings persist — only the game world resets. Many community servers run scheduled map resets every few weeks to keep gameplay fresh.
Enable the admin port in openttd.cfg with admin_port and admin_password. The admin port accepts TCP connections from authorized tools like OpenTTD Game Coordinator or custom management scripts. It allows sending chat messages, monitoring game state, and issuing server commands programmatically.
In cooperative play, all players join the same company and share resources, building one unified transport network. In competitive play, each player or team creates their own company and competes for the same routes and industries. A server can run both modes simultaneously with different companies.
Yes. OpenTTD has a dedicated server mode that runs entirely without a display using the -D flag. This is how the Docker-based setup runs it — headless, with no GUI overhead. The server accepts console commands and admin port connections for management without needing a screen or desktop environment.