Skip to content

Instantly share code, notes, and snippets.

@thomasmalley
Last active September 4, 2024 19:35
Show Gist options
  • Save thomasmalley/e2d85bb76410d3ce47b2882c5e6b346a to your computer and use it in GitHub Desktop.
Save thomasmalley/e2d85bb76410d3ce47b2882c5e6b346a to your computer and use it in GitHub Desktop.
OpenTTD 14.1 Dedicated Server on Linode Nanode 1GB running Debian 12
# Connect via ssh
$ ssh root@ipadress
# Run updates
$ sudo apt update && sudo apt upgrade
# Install tools
$ sudo apt install screen unzip
# Install game dependencies
$ sudo apt install libgomp1 libglib2.0-0
# Download and unpack latest stable game release
$ cd /usr/games
$ wget https://cdn.openttd.org/openttd-releases/14.1/openttd-14.1-linux-generic-amd64.tar.xz
$ tar -xvf openttd-14.1-linux-generic-amd64.tar.xz
$ rm openttd-14.1-linux-generic-amd64.tar.xz
$ mv openttd-14.1-linux-generic-amd64 openttd-14.1
# Install OpenGFX
$ wget https://cdn.openttd.org/opengfx-releases/7.1/opengfx-7.1-all.zip
$ unzip opengfx-7.1-all.zip -d openttd-14.1/baseset
$ rm opengfx-7.1-all.zip
# Start server, adjust basic settings
$ openttd-14.1/openttd -D
$ setting server_game_type public
$ setting client_name Server
$ setting server_name "your server name"
$ setting server_password yourserverpw
$ setting min_active_clients 1
$ rcon_pw yourrconpw
$ exit
# Edit generated configs to your liking
$ ls ~/.config/openttd/
$ nano ~/.config/openttd/openttd.cfg
$ nano ~/.config/openttd/private.cfg
$ nano ~/.config/openttd/secrets.cfg
# Our config: https://gist.github.com/thomasmalley/27bd6aff86e38b2ed54651621b622fe1
# Starting server inside a gnu screen session
$ screen -S openttd-server
$ openttd-14.1/openttd -D
# Detach using Ctrl + a + d
# See running screen sessions
$ screen -ls
# Re-attach to existing screen session
$ screen -r openttd-server
# Console commands overview: https://wiki.openttd.org/en/Manual/Console#server-commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment