Dedicated Linux server extras

From TF2 Classic Wiki
Revision as of 14:13, 15 November 2022 by Sumea (talk | contribs) (Created page with "''Note: This page's metamod+sourcemod installation guide was adapted and revised from a guide written by Raizo, the original of which can be found here: https://iraizo.github.io/tf2-classic-sourcemod-setup/'' == Prerequisites == This guide assumes you already have a server running that can be connected and played on, albeit without any additional modifications. If not you should follow this guide to setup one. To reitorate: * A Linux server ru...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Note: This page's metamod+sourcemod installation guide was adapted and revised from a guide written by Raizo, the original of which can be found here: https://iraizo.github.io/tf2-classic-sourcemod-setup/

Prerequisites

This guide assumes you already have a server running that can be connected and played on, albeit without any additional modifications. If not you should follow this guide to setup one. To reitorate:

  • A Linux server running Ubuntu Server* 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)
  • At least 16GB of free storage for base TF2 Classic installation2
  • A minimum of a 10Mbps upload speed if you intend on hosting a server over the Internet. No need to worry for LAN servers.

*This guide was written for and tested on Ubuntu Server 22.04 LTS, however any Debian-based distro should work similarly and fine using this guide. This page's editor's testing is based on Debian 11.

2More available space is required for custom content such as maps on your game server as well as HTTP/Fast Download server if you choose to use one.

TF2 Classic SourceMod+Metamod Setup

So, as expected, SourceMod isn’t necessarily drag-and-drop like supported SM games are such as TF2 and CS:Source due to this simply being a mod built off of Source SDK 2013 with things like a different game name (tf2classic), offsets, signatures, etc.

While the process of getting SM to work isn’t that hard, generic source server guides do not cover few unique factors that come with setting up fully working MM+SM for mods like TF2 Classic.

Getting SourceMod and MetaMod

Visit the Stable builds section of sourcemod.net and grab the latest Linux build. Download it to your server using wget/curl or to your machine and upload it to your server using SFTP:

If using Linux Server Terminal or SSH instead of SFTP, first navigate to your server tf2classic folder, following example location from Dedicated Server Setup Guide, you want to navigate to /opt/tf2classic/server/tf2classic/ first.

Then you can run wget

$ wget https://sm.alliedmods.net/smdrop/1.11/sourcemod-1.11.0-git6917-linux.tar.gz

This link may be outdated. You can check sourcemod downloads page for the newest version and copy URL of the newest build.

You’ll also need stable Metamod:Source. Download it with one of the ways you did.

$ wget https://mms.alliedmods.net/mmsdrop/1.11/mmsource-1.11.0-git1148-linux.tar.gz

you can now extract both inside your tf2classic folder (/opt/tf2classic/server/tf2classic/)

tar -xf sourcemod-1.11.0-git6917-linux.tar.gz

tar -xf mmsource-1.11.0-git1148-linux.tar.gz

You can delete the archive files after the extracted files are in correct place.

There is still few crucial steps before launching the server.

Replacing metamod.vdf

metamod.vdf is necessary for your server to recognize the game. Since this is a mod, we need to use a web tool to generate a metamod.vdf file for us that points to tf2classic.

You should navigate to your ~/server/tf2classic/addons/, Following Dedicated Server Setup example, we should now navigate to: /opt/tf2classic/server/tf2classic/addons/

You can now delete metamod.vdf and metamod_x64.vdf in this directory. No need to back up these or anything.

Head over to sourcemm.net/vdf. You’re going to leave the “Game:” blank, or as “—”. In the “Game Folder” box, enter tf2classic. It should look exactly like this.