Overview
What? No Linux guide? No worries, I’ve got you covered.This guide assumes you have some knowledge with Linux and server hosting, but if you don’t, it’s fine too.If you have any issues, ask on the official Open Fortress discord server!
Software requirements:
- On 64-bit Ubuntu / Debian based distros run:
sudo dpkg –add-architecture i386; sudo apt update; sudo apt install p7zip lib32gcc1 libstdc++6 libstdc++6:i386 libncurses5:i386 libtinfo5:i386 libcurl4-gnutls-dev:i386 screen subversion On 32-bit run:
sudo apt install p7zip libstdc++6 libncurses5 libtinfo5 libcurl4-gnutls-dev screen subversion- On 64-bit CentOS / Fedora run:
sudo yum install p7zip p7zip-plugins libgcc.x86_64 libgcc.i686 glibc.i686 libstdc++.x86_64 libstdc++.i686 ncurses-libs.i686 libcurl.i686 screen subversion * Use dnf instead of yum on Fedora/RHEL.
- On Arch Linux run:
sudo pacman -Syy p7zip lib32-gcc-libs gcc-libs lib32-ncurses lib32-libcurl-gnutls screen svn
1. Install SteamCMD for Linux
For consistency’s sake, we’ll be working in a directory named ofserver in the home folder of a user named steam. You can folllow exactly what we do here or rename commands and paths accordingly to your setup.
Create a new directory named ofserver in your user’s home directory and go into it
Next, download the linux SteamCMD Tar archive and unpack it
You can now run steamcmd with
And exit it with
2. Install TF2 and Source SDK 2013
For automation and ease of use’s sake, we’ll be using auto-update scripts to ease the updating process.
While still in the /ofserver/ directory, create a file named fullupdate.txt with the following contents:
And now to install the necessary Team Fortress 2 files and Source SDK 2013 MP files using that newly created script, run that script in steamcmd once with the following command:
This will install the necessary files in directories named /Team Fortress 2 Dedicated Server/ and /sdk/ within the /ofserver/ directory.
3. Install Open Fortress
Go into the folder named /sdk/ from the previous step, and run this one-liner:
4. Final links
Go into the /sdk/ directory and from there go into the /bin/ directory.
And paste & run these commands:
And go to the /sdk/open_fortress/bin directory and run this command:
This will create necessary file links for files that don’t exist but should be there.
And you’re done! How to start the server
And that’s all. Wasn’t so hard, was it?
Now, how to run a server.
Create a script to run your server in the /ofserver/sdk/ directory, name it something like run.sh. Here’s a sample server run script.
Make it executable with
Change the launch parameters of the script (whatever is after “./srcds_run”) to your heart’s content. Remember to keep -console -game open_fortress, though.
Run the newly created run.sh script (prefferably in a screen – read below) to start the server.
It’s recommended to run the server in a screen session. Screen is a utility that allows you to run things in “virtual” consoles, so that you can easily attach or detach them, allowing you to run the server without having a terminal open all the time.
To start a new screen session, just type
screenYour new screen session will be automatically “attached”.
To detach from the screen session, press CTRL+A and then D. Detach before closing a terminal, otherwise your server will die.
To reattach a screen session, typescreen -rTo kill a screen session, just press CTRL+D while in the screen.
Auto updating
Since Open Fortress is in rapid development and updates are made every day, it’s important to keep your gameserver updated, otherwise players who update their local copies will eventually encounter problems or won’t be able to play on your server at all.
To update TF2 and and SDK 2013 automatically, place the following in your launch parameters in /ofserver/sdk/run.sh:
For Open Fortress content however you’ll need something more.
Here’s a script that will update just Open Fortress in the setup from this guide. Place it in the /ofserver/ directory and name it updateof.sh and make it executable (with chmod +x)
pkill srcds_linux
pkill srcds_run
pkill screen
svn cleanup $LOCAL_REPO
svn update $LOCAL_REPO –non-interactive –trust-server-cert-failures=unknown-ca,cn-mismatch,expired,not-yet-valid,other –username ‘ofs’ –password ”
screen -d -m /home/steam/ofserver/sdk/run.sh
Now, this script won’t run itself, so run
Pick your editor of choice (if it prompts you) and at the end of the file place the following:
This will check every day at 5AM for an update and restart the server.
Server settings, configuration
Whatever comes out of the box doesn’t have to be your server forever! Open Fortress and the Source engine have a LOT of server settings that can change how your server works, what gamemodes it runs etc.
To change them, create a file named server.cfg if it doesn’t exist in the ~/ofserver/sdk/open_fortress/cfg/ directory and edit it with your custom Convars (Console Variables), which control the server’s functionality.
A few notable Convars:
More Open Fortress specific settings have already been documented in the Windows guide, starting on page 16 in This Document[docs.google.com]
There are also launch parameters, settings that only can be applied on server start. They are the settings with dashes (-) or pluses (+) visible after
./srcds_run
In your run.sh file. Change any launch parameters over there.
Launch parameters with pluses (+) instead of dashes (-) are console commands that will be executed on server start but can also be run while the server is running. Parameters with minuses cannot.
Most popular launch parameters:
TROUBLESHOOTING
- I cannot connect to my server, and the server is invisible in the game browser.
There are so many possible causes for this, ranging from Source engine BS, ISP BS and bad router BS that it’s best you ask for help on the official Open Fortress discord. - I can connect to my server, but the server is invisible in the game browser.
Try the following in server console:ip <your public ip here> sv_lan 0 heartbeat map <some mapname>in console, replacing the map with your map and IP of course.
If the issue is still not fixed, contact the OF Discord - [S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
This doesn’t cause a crash. Safe to ignore. - “Warning: /home/steam/ofserver/sdk/core is truncated: expected core file size”, followed by a crash.
Your gameinfo.txt is broken. Use the vanilla one, or if you’re using different folder name for TF2, edit properly. Ask in discord for help. - dlopen failed trying to load: /home/ubuntu/.steam/sdk32/steamclient.so
This should be safe to ignore and shouldn’t crash, but if you feel better not seeing the error, link over the binary to that path.ln -s ~/ofserver/linux32/steamclient.so ~/.steam/sdk32/(if sdk32 doesn’t exist in .steam, create it)
- “error.mdl was not precached. If you are getting this error, you’re not mounting TF2 correctly.”
Self explanatory, you’re not mounting TF2 correctly. Contact the discord server and we’ll help you out. - ./srcds_run line 324 18491 Segmentation fault $HL_CMD
You shouldn’t be getting this error on Open Fortress, and this can only popup on RHEL-based distributions (Fedora, CentOS).
Triple check that you have libcurl.i686 installed, and run the following commands:ln -s /usr/lib/libcurl.so.4 /usr/lib/libcurl-gnutls.so.4 - Server is failing to load and segfault crashes!
If your server is failing to load and then displays a segment fault crash. You might have forgot to symbolically link your server.so file. To do so just do.ln -s ~/ofserver/sdk/open_fortress/bin/server.so ~/ofserver/sdk/open_fortress/bin/server_srv.so