Skip to content

OpenTTD Server

OpenTTD is an open source simulation game based upon the popular Microprose game "Transport Tycoon Deluxe", written by Chris Sawyer. It attempts to mimic the original game as closely as possible while extending it with new features. OpenTTD is modelled after the original Transport Tycoon game by Chris Sawyer and enhances the game experience dramatically. Many features were inspired by TTDPatch while others are original.

egg-openttd-server.json

updated

Ports

Add an allocation on the node for each port.

  • Game 3979
  • Admin 3977

Install

Installer image
alpine:latest
Install script
27 lines

Image

  • Debian ghcr.io/ptero-eggs/yolks:debian

Startup

The Panel runs this command to start the server. It replaces each variable in the command with the value of that variable.

4 variables

Startup command

./openttd -D
  • The name shown in the serverlist

    srv_nameUsers can edit

    required|string|max:20

  • Show the server in the serverlist on the client, true or false

    srv_advertiseUsers can edit

    required|string|in:true,false

  • The version of OpenTTD i.e. 12.2

    OPENTTD_VERSIONUsers can see

    required|string|max:20

  • The OpenGFX Version i.e. 7.1

    OPENGFX_VERSIONUsers can see

    required|string|max:20

Wings

Stop command
exit
Running when the console shows
[net] Map generated, starting game

Files Wings edits

Wings sets these values in these files before each start.

openttd.cfg ini

network.server_port
{{server.build.default.port}}
network.server_name
{{server.build.env.srv_name}}
network.lan_internet
0
network.server_advertise
{{server.build.env.srv_advertise}}

Readme

OpenTTD

OpenTTD is a business simulation game in which players try to earn money via transporting passengers and freight by road, rail, water and air. It is an open-source remake and expansion of the 1995 Chris Sawyer video game Transport Tycoon Deluxe

Server Ports

Port Default
Game 3979
Admin 3977

Changes

  1. Validate and update embedded URLs

    · Daniel Barton · bf9f3cb

  2. SteamCMD + Other fixes

    · yesBad · edbf925

  3. Add standalone games

    · Daniel Barton · 74c706a

All changes on GitHub

Problem with this egg?

Open an issue on GitHub. Include your Panel and Wings versions.

Install script 27 lines ash in alpine:latest Show
#!/bin/ash
apk add --no-cache xz curl tar unzip

mkdir -p /mnt/server
cd /mnt/server

echo -e "\ncurl -SsL -o openttd-linux.tar.xz https://cdn.openttd.org/openttd-releases/${OPENTTD_VERSION}/openttd-${OPENTTD_VERSION}-linux-generic-amd64.tar.xz"
curl -SsL -o openttd-linux.tar.xz https://cdn.openttd.org/openttd-releases/${OPENTTD_VERSION}/openttd-${OPENTTD_VERSION}-linux-generic-amd64.tar.xz 

echo -e "\nUnpacking tar"
tar -xf openttd-linux.tar.xz --strip-components=1
rm openttd-linux.tar.xz
chmod +x openttd

echo -e "\nRunning curl -sSL -o opengfx.zip https://cdn.openttd.org/opengfx-releases/${OPENGFX_VERSION}/opengfx-${OPENGFX_VERSION}-all.zip"
curl -sSL -o opengfx.zip https://cdn.openttd.org/opengfx-releases/${OPENGFX_VERSION}/opengfx-${OPENGFX_VERSION}-all.zip
unzip opengfx.zip 

tar --strip-components=1 -C baseset/ -xvf opengfx*.tar
rm -fR open*zip open*tar open*gz

[ -f /home/container/openttd.cfg  ] || curl https://raw.githubusercontent.com/ptero-eggs/game-eggs/main/openttd/openttd.cfg > openttd.cfg

## install end
echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"