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 20 GB.
As many Steam game servers require SteamCMD, we will install its dependencies. For reference, SteamCMD requires the following packages:
glibc
glibc-c++
freetype fonts
screen
To install these packages, please execute the following commands as the root user. If you wish to perform this with an unprivileged account, make sure you add sudo before any commands are specified to run as root.
yum groupinstall 'Development Tools' -y
yum install libX11-devel freetype freetype-devel zlib-devel libxcb-devel -yFor 32-bit users, execute the following as the root user:
yum install glibc libstdc++ -yFor 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 -yFirst, 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; this article will be using dotags as the unprivileged user.
useradd dotagsEnter the user account:
su dotagsThen, download SteamCMD:
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gzNow, we need to extract the tar archive:
tar -xvf steamcmd_linux.tar.gzBecause Dota 2 does not allow anonymous To install Dota 2, we need to log in with our accounts. First, start SteamCMD:
./steamcmd.shThen, log in to Steam:
login mysteamusernameLet’s set our installation directory for Dota 2:
force_install_dir ./dota2_gameserver… and begin the installation:
app_update 570This 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/dotaDownload 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.gzAs 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.gzGood job, all that’s left is to start the 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.
In this article, you created your own Dota 2 Server; now you can get in and play!