Video coming soon…

🚂 Setup OpenTTD Server — Transport Tycoon Multiplayer

Dedicated OpenTTD server for multiplayer transport tycoon — build rail, road, air, and sea networks with friends

⚠️ This script is provided for demo and testing purposes only. Not intended for production use.

📦 Resources & Setup Scripts

Grab the automated bash script from GitHub to follow along with the video.

Automated install script — OpenTTD server running in one command.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/gaming/openttd/openttd-ubuntu.sh
chmod +x openttd-ubuntu.sh
sudo bash openttd-ubuntu.sh

Tutorial Steps

1 Download & Run the Installer

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

2 Configure the Server

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

3 Connect with the Game Client

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

4 Admin Management

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

Ports Used

PortPurpose
3979 TCPGame traffic (client connections)
3979 UDPServer discovery and query

Overview

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.

Why Use It

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.

When You Need It

    Who Should Use It

      Real Use Cases

        Main Features

          How to Use After Installation

            Security Best Practices

              Ports and Firewall Notes

              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.

              Backup and Maintenance

                Common Mistakes

                  Troubleshooting

                    Alternatives

                    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.

                    When Not to Use It

                    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 Professional Help

                    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.

                      Contact Us

                      Frequently Asked Questions

                      How many players can an OpenTTD server support?

                      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.

                      What are NewGRFs and how do I install them?

                      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.

                      Can players cooperate in the same company?

                      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.

                      Does the game continue when no players are online?

                      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.

                      Can I reset the map without losing the server setup?

                      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.

                      How do I use the admin port for server management?

                      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.

                      What is the difference between cooperative and competitive play?

                      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.

                      Can I run OpenTTD server without a graphical display?

                      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.