Creating a Dota 2 Server on CentOS 6

  • Last Created On Dec 08, 2024
  • 8
0 0

In this article, we will be creating a Dota 2 server. Dota is a free-to-play multiplayer game released by Valve, the company behind Steam. As a reminder, this article is written for CentOS 6.

Warning: These instructions will not work on the base level AKLWEB HOST VPS plan, as Dota 2 requires more than 15GB of disk space. The minimum plan size is a 20GB SSD plan.

Step 1: Prerequisites And Requirements

As many Steam game servers require SteamCMD, we will be installing the dependencies of it. For reference, SteamCMD requires the following packages:

  • glibc
  • glibc-c++
  • freetype fonts
  • screen

In order to install these packages, please execute the following commands as the root user. If you wish to perform this with a unprivileged account, make sure you add sudo before any commands specified to run as root.

yum groupinstall 'Development Tools' -y
yum install libX11-devel freetype freetype-devel zlib-devel libxcb-devel -y

For 32 bit users, execute the following as the root user:

yum install glibc libstdc++ -y

For 64 bit users, you’ll need the 32 bit compatibility libraries for glibc since SteamCMD runs on only 32 bit environments:

yum install glibc.i686 libstdc++.i686 -y

Step 2: Installing SteamCMD

First, we’ll create a special user to host the game server. We do this because if someone finds an exploit in the game server software, they will only have limited privileges to your VPS. Feel free to change the username, however this article will be using dotags as the unprivileged user.

useradd dotags

Enter the user account:

su dotags

Then, download SteamCMD:

wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz

Now, we need to extract the tar archive:

tar -xvf steamcmd_linux.tar.gz

Step 3: Configuring SteamCMD For Dota 2

Because Dota 2 does not allow the anonymous user to install Dota 2, we need to log in with our own accounts. First, start SteamCMD:

./steamcmd.sh

Then, log into Steam:

login mysteamusername

Let’s set our installation directory for Dota 2:

force_install_dir ./dota2_gameserver

… and begin the installation:

app_update 570

This will take a while, so please be patient.

Now, we need to install MetaMod so that the server runs properly.

Go to the Dota 2 game directory:

cd ~/Steam/steamapps/common/dota 2 beta/game/dota

Download the source and extract it:

wget http://www.metamodsource.net/mmsdrop/1.10/mmsource-1.10.7-git952-linux.tar.gz
tar -xvf mmsource-1.10.7-git952-linux.tar.gz

As Dota 2 requires a program called srcds to run properly, we’ll grab that now:

wget -O srcds.tar.gz https://forums.alliedmods.net/attachment.php?attachmentid=140208&d=1416970992
cd ~/Steam/steamapps/common/dota 2 beta/game/dota
tar -xvf srcds.tar.gz

Good job, all that’s left is to start the server.

Step 4: Starting Your Dota 2 Server

This step is simple; create a screen session and start the server inside of it.

screen -dmS dota2server "/home/Steam/steamapps/common/dota 2 beta/game/dota/srcds_run -game dota -console"

You can put that in /etc/rc.local to have your Dota 2 server start when your instance boots up. Do that by opening it ( nano /etc/rc.local ), paste the command above and save the file.

Conclusion

In this article, you created your own Dota 2 server; now you can get in and play!

Views: 8

Recent Articles

  • How to Install JAX with ROCm Acceleratio...
    96
  • Deploy a PyTorch Workspace on a Vultr Cl...
    71
  • Managing Backup Storage
    83
  • Automating FTP Backups in Windows Server
    71
  • Automating FTP Backups in Linux
    75

Popular Articles

  • Our General Terms & Conditions
    2632
  • Our Privacy Policy
    2478
  • Our Cookies Policy
    275
  • Our Terms of Use
    153
  • How to Install JAX with ROCm Acceleratio...
    96