Counter-Strike: Source (CSS) is a popular multiplayer first-person shooter that is known for its team-based gameplay and realistic physics. Hosting your own dedicated server allows you to play with your friends or the wider gaming community, with full control over the server settings. In this guide, we will walk you through the steps to set up a Counter-Strike: Source server on your AnonVM VPS.
Prerequisites
Before you begin, ensure you have:
- A VPS from AnonVM with at least 2 GB of RAM and 1-2 CPU cores.
- SSH access to your VPS.
- SteamCMD installed on your VPS (Steam’s command-line tool to install and update game servers).
- Basic Linux knowledge.
Step 1: Access Your AnonVM VPS
- Log in to your AnonVM account and access your VPS dashboard.
- Use an SSH client like PuTTY (for Windows) or the terminal (for Linux/Mac) to connect to your VPS:
your-vps-ip
with the actual IP address of your VPS. Enter your password when prompted.
Replace
Step 2: Install Dependencies
-
Update your VPS: It's a good idea to make sure your system is up to date before installing anything:
-
Install required packages: You will need some packages like
lib32gcc1
for 32-bit game server libraries: -
Install SteamCMD: SteamCMD is a command-line version of the Steam client used to install and update game servers.
-
Install
wget
if it’s not already installed: -
Download SteamCMD:
-
Extract the downloaded file:
-
Run SteamCMD to initialize it:
SteamCMD will now download its files. When you see the prompt
(steam)
, you can exit by typing: -
Step 3: Install Counter-Strike: Source Server
-
Create a directory for your server: This is where all server files will be stored.
-
Download and install Counter-Strike: Source server: Use SteamCMD to install the server files. In the SteamCMD prompt, enter:
Then, inside SteamCMD, run:
The
app_update 232330 validate
command installs the latest Counter-Strike: Source server files into the/home/cs-source
directory.
Step 4: Configure the Server
-
Edit the server configuration: Once the installation is complete, you will find the server configuration files in the
/home/cs-source/cstrike/cfg
directory.- Edit the
server.cfg
file:
Here, you can set various server parameters such as:
- hostname: Set the name of your server.
- rcon_password: Set a password for remote control.
- sv_password: Set a server password to restrict access (optional).
- mapcycle: Define the rotation of maps.
Example configuration snippet:
- Edit the
-
Map rotation: Edit the
mapcycle.txt
to add your desired map rotation:Add maps you want to cycle through, one per line:
-
Start server with custom configuration: You can start the server with custom configuration by running:
You can replace
de_dust2
with any map from your rotation and change the number of players accordingly.
Step 5: Open Required Ports
To allow players to connect, you must open the necessary ports:
-
The default Counter-Strike: Source port is 27015 (both UDP and TCP).
Open the required port using UFW (Uncomplicated Firewall):
Step 6: Run the Server in the Background
You can run the server in the background using screen
or tmux
so that it continues running even if you disconnect from SSH.
-
Install
screen
: Ifscreen
isn’t installed, run: -
Start a new screen session:
-
Start your server: Run the server as mentioned earlier:
-
Detach from the screen session: Press
CTRL + A
and thenD
to detach. The server will continue running. -
Reattach to the session: If you need to access the server console again, you can reattach to the screen session:
Step 7: Connect to Your Server
- Launch Counter-Strike: Source on your PC.
- Go to the Find Servers section and enter your VPS IP address and port (e.g.,
your-vps-ip:27015
). - If you have set a password, you will be prompted to enter it.
Step 8: Update the Server
To keep your server up-to-date, follow these steps:
- Stop the server by pressing
CTRL + C
in the screen session. - Update the server using SteamCMD:
- Restart the server:
Conclusion
You have successfully set up a Counter-Strike: Source dedicated server on your AnonVM VPS! You can now enjoy gaming with your friends or invite others to join. With full control over the server settings, you can create a custom experience tailored to your preferences.