Dedicated legacy Linux server: Difference between revisions
From TF2 Classified Wiki
More actions
Port to using the new Metalink |
Technochips (talk | contribs) m fixed headers |
||
| Line 1: | Line 1: | ||
''Note: This was adapted and revised from a guide written by Raizo, the original of which can be found here: https://iraizo.github.io/tf2-classic-linux-server-tutorial/'' | ''Note: This was adapted and revised from a guide written by Raizo, the original of which can be found here: https://iraizo.github.io/tf2-classic-linux-server-tutorial/'' | ||
= Prerequisites = | == Prerequisites == | ||
* A Linux server running Ubuntu Server<sup>*</sup> on an x86_64 CPU. You cannot easily run SRCDS on any other architecture besides an x86_64 CPU. Box64/Box86 may work for ARM processors (e.g. Raspberry Pis) but that's complex, and not covered here. | * A Linux server running Ubuntu Server<sup>*</sup> on an x86_64 CPU. You cannot easily run SRCDS on any other architecture besides an x86_64 CPU. Box64/Box86 may work for ARM processors (e.g. Raspberry Pis) but that's complex, and not covered here. | ||
* A SFTP/SSH client (PuTTY, Termius, FileZilla, MobaXterm) | * A SFTP/SSH client (PuTTY, Termius, FileZilla, MobaXterm) | ||
| Line 11: | Line 11: | ||
''*Ubuntu 20.04 LTS is the first Ubuntu version that starts to phase out many i386 libraries from Focal Fossa repos and future Ubuntu versions. Many Source games still rely on i386 libraries. While TF2C, Steam, and SteamCMD are known to work fine, it is possible other Source games and custom plugins and addons may or may not work properly without utilization of PPAs. | ''*Ubuntu 20.04 LTS is the first Ubuntu version that starts to phase out many i386 libraries from Focal Fossa repos and future Ubuntu versions. Many Source games still rely on i386 libraries. While TF2C, Steam, and SteamCMD are known to work fine, it is possible other Source games and custom plugins and addons may or may not work properly without utilization of PPAs. | ||
'' | '' | ||
= Reading this article = | == Reading this article == | ||
<!-- Originally from https://wiki.teamfortress.com/wiki/Linux_dedicated_server#Reading_this_article --> | <!-- Originally from https://wiki.teamfortress.com/wiki/Linux_dedicated_server#Reading_this_article --> | ||
This article has been written according to standard Linux terminal documentation syntax, meaning the following: | This article has been written according to standard Linux terminal documentation syntax, meaning the following: | ||
| Line 21: | Line 21: | ||
Some commands are listed in-line with the rest of a paragraph and lack this symbol, in which case you should run the command as whichever account you're currently logged in with. | Some commands are listed in-line with the rest of a paragraph and lack this symbol, in which case you should run the command as whichever account you're currently logged in with. | ||
= Creating a steam user for SteamCMD and Source SDK Base 2013 Dedicated Server = | == Creating a steam user for SteamCMD and Source SDK Base 2013 Dedicated Server == | ||
Pick a directory to install your server into. Industry standard is usually in <code>/opt</code>, but <code>/home</code> may be easier for you. If you want to use a directory in <code>/home</code>, omit the <code>-d</code> option as useradd will create a directory in <code>/home</code> with the user’s username, ours being <code>steam</code>. We’ll pick <code>/opt/tf2classic</code>. | Pick a directory to install your server into. Industry standard is usually in <code>/opt</code>, but <code>/home</code> may be easier for you. If you want to use a directory in <code>/home</code>, omit the <code>-d</code> option as useradd will create a directory in <code>/home</code> with the user’s username, ours being <code>steam</code>. We’ll pick <code>/opt/tf2classic</code>. | ||
| Line 34: | Line 34: | ||
<code>-m</code> creates a home directory for it, <code>-d /opt/tf2classic</code> specifies where our home directory will be, and <code>-s /usr/bin/bash</code> sets the shell to bash. | <code>-m</code> creates a home directory for it, <code>-d /opt/tf2classic</code> specifies where our home directory will be, and <code>-s /usr/bin/bash</code> sets the shell to bash. | ||
= Installing Source SDK Base 2013 DS, SteamCMD, and dependencies = | == Installing Source SDK Base 2013 DS, SteamCMD, and dependencies == | ||
The SteamCMD package is in the multiverse repos. TF2Classic and SteamCMD require i386 (32-bit) libraries to function. You also need 7-Zip to extract TF2Classic. | The SteamCMD package is in the multiverse repos. TF2Classic and SteamCMD require i386 (32-bit) libraries to function. You also need 7-Zip to extract TF2Classic. | ||
| Line 64: | Line 64: | ||
Give it a few, and when it’s finished we can run <code>exit</code>. | Give it a few, and when it’s finished we can run <code>exit</code>. | ||
= Downloading TF2 Classic = | == Downloading TF2 Classic == | ||
The fastest way to download TF2Classic is to use a command-line download manager called Aria2 in combination with a "Metalink" which downloads from many mirrors at once. | The fastest way to download TF2Classic is to use a command-line download manager called Aria2 in combination with a "Metalink" which downloads from many mirrors at once. | ||
| Line 81: | Line 81: | ||
<code>mv tf2classic /opt/tf2classic/server/</code> | <code>mv tf2classic /opt/tf2classic/server/</code> | ||
= Server Configuration = | == Server Configuration == | ||
Generate your server config(s) on [https://cfg.tf/ cfg.tf]. | Generate your server config(s) on [https://cfg.tf/ cfg.tf]. | ||
| Line 92: | Line 92: | ||
And merge the <code>cfg</code> folder with <code>/opt/tf2classic/server/tf2classic/cfg/</code>. | And merge the <code>cfg</code> folder with <code>/opt/tf2classic/server/tf2classic/cfg/</code>. | ||
= Creating the server script = | == Creating the server script == | ||
Change into the server directory with: | Change into the server directory with: | ||
| Line 115: | Line 115: | ||
</code> | </code> | ||
= Create symlinks to missing shared objects. = | == Create symlinks to missing shared objects. == | ||
Valve changed some shared object file names in the SDK and the objects we’re given have not adapted to the new names. Since these are simply renames, we can symlink them. | Valve changed some shared object file names in the SDK and the objects we’re given have not adapted to the new names. Since these are simply renames, we can symlink them. | ||
'''Your server will not start without doing this.''' | '''Your server will not start without doing this.''' | ||
| Line 149: | Line 149: | ||
</code> | </code> | ||
= Running the server = | == Running the server == | ||
Finally, all you need to do to start the server is run <code>./runserver.sh</code>! | Finally, all you need to do to start the server is run <code>./runserver.sh</code>! | ||