In the following tutorial you will learn how to install a hybrid Counter-Strike 1.6 server on a Linux powered server at your own. A hybrid Counter-Strike 1.6 server is a Counter-Strike 1.6 game server that allows Steam clients (legit Steam accounts) and non Steam clients (non Steam game clients) as well as owners of old game clients with the game protocol version 47 to enter your server.
This hybrid mode is achieved by a metamod plugin called "Dproto" by Crock from a Russian Counter-Strike community. The guide is written within the new standards of SteamCMD by Valve as HLDSUpdateTool has become outdated. However SteamCMD is not as final as HLDSUpdateTool was so you may experience certain issues.
In cases of issues or if you need help feel free to ask for help here.
This hybrid mode is achieved by a metamod plugin called "Dproto" by Crock from a Russian Counter-Strike community. The guide is written within the new standards of SteamCMD by Valve as HLDSUpdateTool has become outdated. However SteamCMD is not as final as HLDSUpdateTool was so you may experience certain issues.
In cases of issues or if you need help feel free to ask for help here.
1. Create a new Linux user for your gameserver
It is highly not recommended to run a gameserver from your root account or a Linux user account that already runs other applications.
Therefor you will create a totally new Linux user account which will be used to run your Counter-Strike 1.6 hybrid server.
Use the following command to create a new Linux user account:
Replace "<username>" with the username you'd like to use for the gameserver. You will be asked to fill in the password twice and some other information. Do this steps to create the user. You don't have to fill out things like Full name, Room Number and so on. To leave them empty just hit enter. When you are asked if the information is correct press Y and then hit your ENTER key.
Screenshot
After you've hit your ENTER key the user creation process will finish if all information was entered correct.
Login as the new user with the su command:
Replace "<username>" with the username of the user you created. After you typed the command hit your ENTER key to login. You can also logout from your account by closing your SSH session and opening a new session where you login with the new user.
Screenshot
After you've logged into the user with su you still will be located at "/root" where normal users cannot operate.
Use the cd command to go to your own home directory:
Just type in cd and hit your ENTER key and you will be in your home directory. If you have opened a new SSH session as the new user you don't have to do this because you are already in your home directory.
Therefor you will create a totally new Linux user account which will be used to run your Counter-Strike 1.6 hybrid server.
Use the following command to create a new Linux user account:
adduser <username>(New Linux user accounts can only be created by root)
Replace "<username>" with the username you'd like to use for the gameserver. You will be asked to fill in the password twice and some other information. Do this steps to create the user. You don't have to fill out things like Full name, Room Number and so on. To leave them empty just hit enter. When you are asked if the information is correct press Y and then hit your ENTER key.
Screenshot
After you've hit your ENTER key the user creation process will finish if all information was entered correct.
Login as the new user with the su command:
su <username>
Replace "<username>" with the username of the user you created. After you typed the command hit your ENTER key to login. You can also logout from your account by closing your SSH session and opening a new session where you login with the new user.
Screenshot
After you've logged into the user with su you still will be located at "/root" where normal users cannot operate.
Use the cd command to go to your own home directory:
cd
Just type in cd and hit your ENTER key and you will be in your home directory. If you have opened a new SSH session as the new user you don't have to do this because you are already in your home directory.
2. Download and extract SteamCMD
Now you have to download the SteamCMD client to your home directory and extract it to use it for the installation of the actual gameserver.
Make a new folder for it called "steamcmd" with the mkdir command:
Screenshot
Just type in the command and hit ENTER to create the folder. After that change directory to that folder with the cd command.
Change directory to steamcmd:
Just type in the command, hit ENTER and you are already in the folder.
Screenshot
You are now in the folder for Valve's tool SteamCMD. Time to download the tool from Valve's server and extract it.
Download SteamCMD:
Type in the command and hit ENTER and watch it downloading.
Screenshot
Extract the downloaded archive with the tar command:
Enter the command and hit ENTER. A progress will be shown and you can watch all files being extracted.
Screenshot
You have successfully downloaded and extracted the SteamCMD tool.
Make a new folder for it called "steamcmd" with the mkdir command:
mkdir steamcmd
Screenshot
Just type in the command and hit ENTER to create the folder. After that change directory to that folder with the cd command.
Change directory to steamcmd:
cd steamcmd/
Just type in the command, hit ENTER and you are already in the folder.
Screenshot
You are now in the folder for Valve's tool SteamCMD. Time to download the tool from Valve's server and extract it.
Download SteamCMD:
Code:
wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz
Type in the command and hit ENTER and watch it downloading.
Screenshot
Extract the downloaded archive with the tar command:
tar -xvzf steamcmd_linux.tar.gz
Enter the command and hit ENTER. A progress will be shown and you can watch all files being extracted.
Screenshot
You have successfully downloaded and extracted the SteamCMD tool.
3. Installation of the Counter-Strike 1.6 gameserver files
Time to download the gameserver files for Counter-Strike 1.6 files to your server.
Start steamcmd:
Just type in this command and hit ENTER. You will see the tool starting and updating itself.
Screenshot
Wait until it has downloaded and installed the updates for SteamCMD and you will be able to see a command line starting with "Steam>".
Screenshot
Now login as anonymous in the SteamCMD command line.
Login as anonymous:
Enter the command from above and hit ENTER. If the login was successful you will get a message like this one: "Connecting anonymously to Steam Public...Success.".
Screenshot
Time to set the directory where you want the gameserver files to be installed. I recommend them to be installed in a folder called like the game in your home directory.
Set installation path:
Replace "username" in "/home/username/cs" with the name of the user you are logged in and then hit ENTER to set the path.
Screenshot
Now let's download the files with the app_update command.
Download the server files:
Just type in this command hit ENTER. WARNING: SteamCMD has a bug related to HLDS games. You are required to run command to download the files multiple times to download all files!
Screenshot (1st attempt)
You are not done because the bug is doing it's job right now. Run the command again.
Screenshot (2nd attempt)
If you think you are done you're wrong. Run the command again to try to defeat the bug.
Screenshot (3rd attempt)
Now SteamCMD has started downloading the files and we have defeated the bug. Wait until it has finished the download process.
Screenshot
Run the command a last time to validate all files to avoid broken files or incomplete downloads.
Screenshot (successful validation)
Everything is good and you've downloaded and validated the gameserver files. Quit SteamCMD with the command "quit".
Quit SteamCMD:
Screenshot
If SteamCMD was successfully closed you will see a half broken SteamCMD command line entry and your real command line as in the screenshot above. This is a sign of success for the quition process.
Start steamcmd:
./steamcmd.sh
Just type in this command and hit ENTER. You will see the tool starting and updating itself.
Screenshot
Wait until it has downloaded and installed the updates for SteamCMD and you will be able to see a command line starting with "Steam>".
Screenshot
Now login as anonymous in the SteamCMD command line.
Login as anonymous:
login anonymous
Enter the command from above and hit ENTER. If the login was successful you will get a message like this one: "Connecting anonymously to Steam Public...Success.".
Screenshot
Time to set the directory where you want the gameserver files to be installed. I recommend them to be installed in a folder called like the game in your home directory.
Set installation path:
force_install_dir /home/username/cs
Replace "username" in "/home/username/cs" with the name of the user you are logged in and then hit ENTER to set the path.
Screenshot
Now let's download the files with the app_update command.
Download the server files:
app_update 90 validate
Just type in this command hit ENTER. WARNING: SteamCMD has a bug related to HLDS games. You are required to run command to download the files multiple times to download all files!
Screenshot (1st attempt)
You are not done because the bug is doing it's job right now. Run the command again.
Screenshot (2nd attempt)
If you think you are done you're wrong. Run the command again to try to defeat the bug.
Screenshot (3rd attempt)
Now SteamCMD has started downloading the files and we have defeated the bug. Wait until it has finished the download process.
Screenshot
Run the command a last time to validate all files to avoid broken files or incomplete downloads.
Screenshot (successful validation)
Everything is good and you've downloaded and validated the gameserver files. Quit SteamCMD with the command "quit".
Quit SteamCMD:
quit
Screenshot
If SteamCMD was successfully closed you will see a half broken SteamCMD command line entry and your real command line as in the screenshot above. This is a sign of success for the quition process.
4. Install metamod
We have the plain gameserver files that only allow legit Steam clients to access your gameserver but not non Steam clients or clients with older game protocol versions.
We need metamod and Dproto to achieve the hybrid mode.
Change directory to the gameserver files:
First type in "cd ../" and then "cd cs" to change directory to the gameserver files.
Screenshot
Once you are in the folder change directory again to the "cstrike" folder.
Change directory to cstrike:
Enter the command in your command line, hit ENTER and you're there already.
Screenshot
Now create a folder called "addons" with mkdir which will be used for the plugins metamod and dproto.
Create addons folder:
Change directory to addons:
Create metamod folder:
Change directory to metamod:
Create folder dlls:
Change directory to dlls:
Download metamod:
Extract metamod:
Screenshot
Go up one level and create a file called "plugins.ini" that we'll need to load up Dproto through metamod.
Go up one level:
Create plugins.ini:
Screenshot
Go back to the cstrike folder with the cd command.
Go back to cstrike:
Replace "username" with the username of the user where you have the gameserver files installed on.
Screenshot
Open the file "liblist.gam" with a text editor like nano or vi. I recommend nano for newbies because vi will only confuse you and you will get very angry with it (if you don't have it install it as root before doing this step through a second SSH session).
Open liblist.gam with nano:
Just type in this command and hit ENTER. The editor will load up the file and you will see the content.
Screenshot
Navigate through the editor with your up, down, right and left keys. Go to the line with "gamedll_linux "dlls/cs.so" and change it to "gamedll_linux "addons/metamod/dlls/metamod_i386.so".
Screenshot
Save the file with the following key combination: CTRL + X, then Y and ENTER.
Screenshot
Now metamod is installed successfully and the gameserver will use metamod's .so files to launch with plugin support.
We need metamod and Dproto to achieve the hybrid mode.
Change directory to the gameserver files:
cd ../ cd cs
First type in "cd ../" and then "cd cs" to change directory to the gameserver files.
Screenshot
Once you are in the folder change directory again to the "cstrike" folder.
Change directory to cstrike:
cd cstrike/
Enter the command in your command line, hit ENTER and you're there already.
Screenshot
Now create a folder called "addons" with mkdir which will be used for the plugins metamod and dproto.
Create addons folder:
mkdir addons
Change directory to addons:
cd addons/
Create metamod folder:
mkdir metamod
Change directory to metamod:
cd metamod/
Create folder dlls:
mkdir dlls
Change directory to dlls:
cd dlls/
Download metamod:
Code:
wget http://apps.singul4rity.com/metamod-1.20-linux.tar.gz
Extract metamod:
tar -xvzf metamod-1.20-linux.tar.gz
Screenshot
Go up one level and create a file called "plugins.ini" that we'll need to load up Dproto through metamod.
Go up one level:
cd ../
Create plugins.ini:
touch plugins.ini
Screenshot
Go back to the cstrike folder with the cd command.
Go back to cstrike:
cd /home/username/cs/cstrike
Replace "username" with the username of the user where you have the gameserver files installed on.
Screenshot
Open the file "liblist.gam" with a text editor like nano or vi. I recommend nano for newbies because vi will only confuse you and you will get very angry with it (if you don't have it install it as root before doing this step through a second SSH session).
Open liblist.gam with nano:
nano liblist.gam
Just type in this command and hit ENTER. The editor will load up the file and you will see the content.
Screenshot
Navigate through the editor with your up, down, right and left keys. Go to the line with "gamedll_linux "dlls/cs.so" and change it to "gamedll_linux "addons/metamod/dlls/metamod_i386.so".
Screenshot
Save the file with the following key combination: CTRL + X, then Y and ENTER.
Screenshot
Now metamod is installed successfully and the gameserver will use metamod's .so files to launch with plugin support.
5. Install Dproto
Now it's time to install Dproto to enable hybrid mode.
Change directory to addons:
Create dproto folder:
Change directory to dproto:
Download dproto dlls:
Screenshot
Go back to the cstrike and download the dproto configuration file.
Go back to cstrike:
Replace "username" with the username of the user where you have the gameserver files installed on.
Download dproto.cfg:
Screenshot
Now you have to enable Dproto as a metamod plugin.
Change directory to addons:
Change directory to metamod:
Screenshot
To enable it as a plugin open plugins.ini with nano.
Open plugins.ini with nano:
Add the following to the file "linux addons/dproto/dproto_i386.so".
Screenshot
Save the file with the following key combination: CTRL + X, then Y and ENTER.
Screenshot
Now we've activated Dproto in metamod and enabled the hybrid mode.
Change directory to addons:
cd addons/
Create dproto folder:
mkdir dproto
Change directory to dproto:
cd dproto/
Download dproto dlls:
Code:
wget http://apps.singul4rity.com/dproto_i386.so
Screenshot
Go back to the cstrike and download the dproto configuration file.
Go back to cstrike:
cd /home/username/cs/cstrike
Replace "username" with the username of the user where you have the gameserver files installed on.
Download dproto.cfg:
wget http://apps.singul4rity.com/dproto.cfg
Screenshot
Now you have to enable Dproto as a metamod plugin.
Change directory to addons:
cd addons/
Change directory to metamod:
cd metamod/
Screenshot
To enable it as a plugin open plugins.ini with nano.
Open plugins.ini with nano:
nano plugins.ini
Add the following to the file "linux addons/dproto/dproto_i386.so".
Screenshot
Save the file with the following key combination: CTRL + X, then Y and ENTER.
Screenshot
Now we've activated Dproto in metamod and enabled the hybrid mode.
6. Start the server
Time to start the server. First go back to the folder with all gameserver files and then issue the startup command.
Go back to the gameserver files:
Replace "username" with the username of the user where the gameserver files are installed.
Screenshot
Now let's start the gameserver.
Start the gameserver:
Replace "<ipofyourserver>" with the IP address of your VPS and then hit ENTER to start the server.
Screenshot
It is likely that you will get a error like:
If this happens press CTRL + X to exit the crashed server and to continue the guide to fix the error. Otherwise you have started the server success and the last you see is " VAC secure mode is activated.".
The fix: Run the server startup command again and the server will launch properly.
You're done. This is everything. You have started the server and it is running. Now you can connect and play. It will close when you leave the SSH session so I recommend to start it up in a screen or tmux session.
Go back to the gameserver files:
cd /home/username/cs
Replace "username" with the username of the user where the gameserver files are installed.
Screenshot
Now let's start the gameserver.
Start the gameserver:
./hlds_run -console -game cstrike -ip <ipofyourserver> -port 27015 +maxplayers 32 +map de_dust2
Replace "<ipofyourserver>" with the IP address of your VPS and then hit ENTER to start the server.
Screenshot
It is likely that you will get a error like:
Code:
[S_API FAIL] SteamAPI_Init() failed; SteamAPI_IsSteamRunning() failed.
FATAL ERROR (shutting down): Unable to initialize Steam.
If this happens press CTRL + X to exit the crashed server and to continue the guide to fix the error. Otherwise you have started the server success and the last you see is " VAC secure mode is activated.".
The fix: Run the server startup command again and the server will launch properly.
You're done. This is everything. You have started the server and it is running. Now you can connect and play. It will close when you leave the SSH session so I recommend to start it up in a screen or tmux session.