Complete Guide to Setting Up a CS2 Private Server on a Hong Kong Dedicated Server
If you own a Hong Kong dedicated server, have you ever thought about playing CS2 with your friends? Don’t worry, setting up a CS2 private server is not as complicated as you might think. This article will guide you step by step on how to set up your own CS2 game server on a Linux system using SteamCMD, allowing you and your buddies to have even more fun!
Preparation
Before you start, you’ll need to prepare the following:
- A Hong Kong dedicated server running a Linux system (such as Ubuntu or CentOS), with a recommended configuration of at least 2 cores and 4G memory
- A Steam account, preferably with some play time
- CS2 game client, which needs to be purchased and activated in advance
- Basic Linux operation skills
If you’re not familiar with Linux yet, it’s recommended to learn some basic commands first. This tutorial mainly uses the SSH terminal for operations. Make sure you can connect to the server and execute commands.
Installing SteamCMD
SteamCMD is a command-line version of the Steam client provided by Valve, which can be used to download and deploy servers for many Steam games. It’s a powerful tool for setting up private servers.
First, create a directory to store SteamCMD:
mkdir ~/steamcmd && cd ~/steamcmd
Then download the SteamCMD installation package:
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
Extract it to the current directory:
tar -xvzf steamcmd_linux.tar.gz
After extraction, there will be an additional steamcmd.sh file in the current directory, which is the main program of SteamCMD.
Downloading CS2 Server
Launch SteamCMD:
./steamcmd.sh
The first launch will automatically update. Wait for it to complete, and a steam> interactive prompt will appear. Enter the login command to log in anonymously:
login anonymous
Then execute the following command to download and install the CS2 server:
force_install_dir ../cs2ds
app_update 1238990 validate
SteamCMD will automatically download the latest version of the CS2 server to the cs2ds directory in the upper level. The download process may take more than 10 minutes, depending on your network speed.
After the download is complete, enter quit to exit the SteamCMD interactive interface. Generally, you only need to download once. For subsequent updates, you can directly execute app_update 1238990.
Configuring Server Parameters
Enter the CS2DS installation directory:
cd ~/cs2ds
The main configuration files include:
- server.cfg – The main configuration file for the CS2 private server
- gamemode_competitive_server.cfg – Configuration for 5v5 competitive mode
- gamemode_deathmatch_server.cfg – Configuration for personal deathmatch mode
Open server.cfg with a text editor such as vim, and set the following common parameters:
hostname "Your Server Name" // Server name
rcon_password "your_password" // RCON password, required for managing the server
sv_password "server_password" // Server password, required for players to connect
sv_lan 0 // Set to 0 to be visible on the internet
In addition, you can also set parameters such as map rotation list, game mode, maximum number of players, etc. You can refer to the server.cfg example file in the same directory.
After editing, save server.cfg. Then, according to your preference, you can continue to modify the configuration for competitive or deathmatch mode.
Starting and Accessing the Server
After the configuration is complete, you can start the CS2 server by executing the following command:
./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 1 +mapgroup mg_active +map de_dust2
The above command will start a server in competitive mode with de_dust2 as the initial map. If you need to change the game mode and map, just modify the corresponding parameters.
After the server starts, you can connect to the private server in the CS2 client by using connect your_server_ip. If you cannot connect, please check the firewall settings of the server and ensure that the TCP/UDP port 27015 is open.
After entering the game, you can open the console and enter rcon_password your_password to obtain administrator privileges, allowing you to use various rcon commands to manage the server.
Summary
Setting up a CS2 private server on a Hong Kong dedicated server only requires a few simple steps: installing SteamCMD, downloading CS2DS, modifying configuration files, and starting the server. The entire process can be completed in less than half an hour.
With your own CS2 server, you can freely explore more ways to play the game and experience the thrill of 5v5 battles. Hurry up and call your friends to compete on the Hong Kong server!