OpenTTD

OpenTTD

Not enough ratings
OpenTTD Dedicated Headless Server GNU/Linux Quick Guide (2024)
By Deep Space Pine
Basic directions for setting up an OpenTTD dedicated headless server.
   
Award
Favorite
Favorited
Unfavorite
Introduction
Hello Game Managers!

This is a quick guide for experienced server administrators that want to run a dedicated headless server for OpenTTD on a GNU/Linux server [without a gui].


This guide assumes you are:

1) Familiar with administrating GNU/Linux via SSH and SFTP

2) Running a Debian-based OS

3) Using a non-root account

4) Connecting to the server via SSH



I am using:
  • Ubuntu Server 22.04.4 LTS (as a LXC Container on Proxmox)
  • OpenTTD 14.0 RC1
  • FileZilla
  • Konsole for SSH

These or similar directions may work on other GNU/Linux distributions.

I based this guide on information from the following link. It seems out of date now - I updated 'libfluidsynth2' to 'libfluidsynth3'. (I am not affiliated with this site in any way)

Originally posted by docs.vultr.com, 2021-04-08:
https://docs.vultr.com/how-to-install-an-openttd-server-on-ubuntu-20-04


Game & Graphics Files
Game File
Get the game file from the source, note the version number you're using as your players will likely need to run the same version. There is a stable version and newer testing versions, choose one.

Latest Stable
https://www.openttd.org/downloads/openttd-releases/latest

Testing versions
https://www.openttd.org/downloads/openttd-releases/testing



OpenGFX Graphics Package
On the same page where you download the game there should be a link for downloading OpenGFX files:
https://www.openttd.org/downloads/opengfx-releases/latest



Directions
Prepare your SFTP and SSH applications.


Extract the game and graphics files locally.


Using SFTP (FileZilla):

Make a folder on the server for the game files like: /home/<your_username>/openttd-server

Copy the extracted game files from your machine into this folder.


Make this specific folder on the server: /home/<your_username>/.openttd/baseset

Copy the extracted OpenGFX files from your machine into this folder.


Example of directory structure:





SSH into the server:

Install Screen
$ sudo apt install screen


Install Game Dependencies
$ sudo apt install -y fontconfig-config fonts-dejavu-core libasyncns0 libflac8 libfontconfig1 libpulse0 libsdl2-2.0-0 libsndfile1 libvorbisenc2 libwayland-client0 libwayland-cursor0 libwayland-egl1 libxcursor1 libxfixes3 libxi6 libxinerama1 libxkbcommon0 libxrandr2 libxrender1 libxss1 libxxf86vm1 x11-common libfluidsynth3


Start a screen Session
$ screen -S openttd-server-screen


Move to Game Folder
$ cd openttd-server


Let User Run Game File
$ sudo chmod u+x openttd


Do a First Run to Create Config File
$ ./openttd -D


Stop with Ctrl+c


Now you can clean up your local files, configure the server, and relaunch when ready.


Configuration file is at:
<your_username>/.openttd/openttd.cfg
Edit remotely with your favorite editor like nano or download edit on your machine and upload.


After starting up the game remember to disconnect from your screen session with Ctrl+a d before exiting the terminal session to keep game running.


Happy building!


1 Comments
dbo666 Mar 27, 2024 @ 6:37am 
Great guide.Thank you!