Setting up a Steam Dedicated Game Server on Centos 8

Step by step guide to install a Steam dedicated server on Centos 8

Setting up a Steam Dedicated Game Server on Centos 8
  1. Firstly, install Centos 8, either as a VM or on a physical box. I won't cover this here, as I will call it assumed knowledge.
  2. Once you have done this, I generally like to do a full system update before installing anything else.
dnf update -y

3. Next we prepare our packages and requirements, this requires installing 32bit packages (i686) as steamcmd is 32bit

dnf install wget tar glibc.i686 libstdc++.i686 -y
dnf --enablerepo=powertools install SDL2.i686 -y

4. After this is done, source our SteamCMD files

mkdir ~/Steam
cd ~/Steam
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xzvf steamcmd_linux.tar.gz

5. After extracting the files, its time to run Steam

./steamcmd.sh

6. Steamcmd should start and try to update itself. Then you should see the following.

Steam>

7. Login anonymously

Steam>login anonymous

8. It's time to install a Steam Game, you can find the correct Dedicated Server application number from the link below.

Dedicated Servers List - Valve Developer Community

Use an app number from the list above and replace the "xxxx"'s with this number below

Steam>app_update xxxxx
Steam>quit

9. Before running your Server, you'll need to open up your firewall port if you have any intention of hosting the server online.

You will need to look up what ports are needed for the specific game you want to host before running the next step. Once again, replace the "xxxx"'s below with the port numbers required. Also make sure you pick the correct tcp/udp option for the port.

Repeat this step for every port necessary.

firewall-cmd --zone=public --add-port=xxxx/tcp --permanent
firewall-cmd --reload
setenforce 0

Then reload your firewall and turn off SE Linux.

Don't forget to port forward these ports to your server IP on your router! (Not explained here)

10. Navigate to the game folder

cd steamapps/common/<<Game Name Here>>

11. At this point you are usually ready to boot your server, you can optionally modify your start file in order to name your server etc.

To do so, use your favorite editor (vi/nano) to modify start_server.sh (or equivalent start file for your game of choice, this may vary).

./start_server.sh

Happy Gaming!