Creating your own server in Counter-Strike 2 is not just a great way to customize the gameplay to your needs and play with your circle of friends. It’s a whole world of opportunities for enthusiasts and administrators. Your own server opens unlimited horizons for creativity and control: you set the rules, choose the maps, adjust game parameters such as speed, weapon damage, or round economy, and ensure a stable connection with low ping without random players. It’s an ideal platform for cozy evening games with colleagues, organizing amateur tournaments, or simply honing your skills in a controlled arena. You become the full owner of your virtual space.
In this article, we will cover all stages of creating and setting up a CS2 server from scratch in as much detail as possible, taking into account all potential pitfalls. We will go through the process from selecting a provider and configuring the operating system to the moment when you and your friends are already battling on a freshly deployed server. If you carefully follow each step of the instructions, even a complete beginner who has never administered a Linux server before will be able to manage the setup.
One of the most important questions for anyone thinking about creating their own game server is choosing a reliable provider. Stability, low ping, uninterrupted uptime, and responsive technical support are key factors for comfortable and hassle-free gameplay. Hosting a CS2 server on a home computer comes with risks: a dynamic IP address, unstable connection, high ping for players from other regions, and the need to keep the PC running 24/7. Ordering a virtual server (VPS) solves all these problems by providing powerful and stable hardware in a professional data center.
For our CS2 server, we will choose a VDS from Hostman with the following configuration: CPU 2 x 3.3 GHz, RAM 4 GB, NVMe 80 GB; 1 IPv4.
This setup is sufficient for comfortable gameplay with friends, roughly 8–10 people. If you’re thinking about something bigger, such as a public server with regular activity of 20+ players or running complex mods with many plugins (e.g., MetaMod, SourceMod), it’s worth considering a more expensive, high-performance plan with extra resources. With Hostman, you can easily scale your setup, so you can start small and upgrade your virtual server configuration at any time with just a few clicks.
The system that will run the server is Ubuntu 24.04 LTS (Noble Numbat). This is a stable and popular distribution version, ensuring compatibility and a wealth of ready-made instructions available online.
First, connect to your server via SSH; more details can be found in our article.
To create the server, we need to install Docker and Docker Compose. To do this:
Update APT packages:
sudo apt updateInstall supporting packages:
sudo apt install curl software-properties-common ca-certificates apt-transport-https -ycurl: a tool for transferring data and working with URLs;software-properties-common: provides scripts for software management;ca-certificates: necessary for secure data transfer and certificate validation;apt-transport-https: allows working with repositories that transmit data via HTTPS.Import the GPG key:
wget -O- https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor | sudo tee /etc/apt/keyrings/docker.gpg > /dev/nullAdd the Docker repository:
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/nullUpdate APT package indexes again:
sudo apt updateInstall Docker:
sudo apt install docker-ce -yCheck that Docker is running correctly:
sudo systemctl status dockerThis command will show Docker’s status, indicating that it is active and running.
Great! Docker has been successfully installed.
This stage can be conditionally divided into two parts: obtaining a special key from Steam and directly configuring the server container.
For your server to be legal and fully functional, it needs a unique key for authentication on the Steam network. Without this token, the server will be considered anonymous and severely limited in its functionality (marked as “pirate,” with some features disabled).
Steam account requirements:
Step-by-step instructions:
This token is the password to access your server from your account. Do not publish it publicly or share it with third parties.
Now let’s return to our server terminal. We will use a ready-made solution in the form of a Docker container, which significantly simplifies the process of installing and updating the game server.
sudo docker -v && sudo docker compose versionThe output should show the versions of Docker and Docker Compose, confirming they are ready to use.
mkdir cs2server && cd cs2serverdocker-compose.yml configuration file. Instead of creating the file manually, we’ll use a ready-made example from a popular repository. Download it directly to the server:wget https://raw.githubusercontent.com/joedwards32/CS2/refs/heads/main/examples/docker-compose.yml.env configuration file. This is the most important file, containing all sensitive data and your server settings. nano .envgenerated_token_earlier with the GSLT token you obtained in the previous section:# Mandatory parameters
SRCDS_TOKEN=generated_token_earlier
# Password for RCON (remote server management)
CS2_RCONPW=Your_Complex_Password_1
# Password for connecting to the server (leave empty for public server)
CS2_PW=
# Your server’s name as players will see it in the server list
CS2_SERVERNAME=My Cool CS2 Server
# Password for GOTV (spectator mode)
TV_PW=Your_Complex_Password_2
# Additional settings (can be configured later)
CS2_PORT=27015
CS2_TV_PORT=27020
CS2_IP=0.0.0.0
CS2_MAXPLAYERS=10
CS2_MAP=de_dust2
CS2_GAMETYPE=0
CS2_GAMEMODE=1
After filling in the values, press Ctrl+O to save the file, Enter to confirm, and Ctrl+X to exit the nano editor.
docker-compose.yml configuration. Open the file to quickly review or modify some parameters:nano docker-compose.ymlYou’ll see the file structure. Here you can directly change parameters such as:
CS2_SERVERNAME: the server name visible to players.CS2_RCONPW: password for remote management via RCON.CS2_PW: password to connect to the server. Leave empty for a public server: "".TV_PW: password for spectators on GOTV../cs2/csgo:/home/steam/cs2-dedicated/csgo: connects your server’s configuration folder to the container folder, ensuring settings persist after updates.After reviewing and making any changes, save the file (Ctrl+O, Enter, Ctrl+X).
Run the container:
sudo docker compose up -dThe -d flag means “detached,” so the container will run in the background while you can continue working in the terminal.
Monitor the process with the following commands:
General container status:
sudo docker compose psView real-time logs (very useful for tracking progress):
sudo docker compose logs -fTo exit log monitoring, press Ctrl+C.
View only the latest log entries:
sudo docker compose logsThe logs will show how the server downloads and updates CS2. Completion and successful launch are indicated by a line like:
[S_API] SteamNETSockets startup successfuland the absence of errors.
Do not interrupt the process or shut down the server until loading is complete. Wait for the readiness message.
If you see a successful launch message in the logs, your CS2 server is now running and is likely visible in the public server list in the game. Next, we move on to testing and fine-tuning it.
Now we can join our own server.
~ key on your keyboard, below Esc).connect 123.123.123.123Replace 123.123.123.123 with your server’s real IP address.
If you set a server password (CS2_PW), enter:
password your_server_passwordbefore running the connect command.
Once connected, you can start playing on your personal server.
As you can see, the process of creating your own Counter-Strike 2 game server, though it may seem complex at first, becomes quite manageable with a clear step-by-step guide.
Successfully launching a game server is important but only the first step in creating a stable and engaging gaming environment. Further work should focus on comprehensive optimization and configuration of all server systems.
The foundation of stable operation is a well-configured server file setup. These settings determine all aspects of functionality, from network parameters and game rules to security and performance. Detailed configuration ensures reliable and predictable server operation.
To expand functionality, you should implement modular platforms like MetaMod and SourceMod. These systems allow integration of a wide range of plugins, providing enhanced moderation, analytics, and game management capabilities.
Special attention should be paid to designing a balanced map rotation cycle, which directly affects player retention. Properly configured map rotation maintains long-term community interest.
Equally important is implementing a thoughtful administration system with clearly defined access rights. This ensures rapid response to incidents and minimizes operational risks.
A key element of professional project positioning is integrating a domain name. Using a custom domain instead of an IP address increases brand recognition, simplifies user access, and builds trust. The domain becomes part of corporate identity and integrates easily into marketing materials.
Implementing these measures comprehensively allows you to create a full-featured, reliable, and scalable gaming product, ready for your target audience and future development.
