How to Host a CS2 Dedicated Server on a VPS — Step-by-Step Guide
Published: January 13, 2026
Reading Time: ~7 min
Category: Guides
// 1. Why Host Your Own CS2 Server?
Running your own Counter-Strike 2 dedicated server gives you complete authority over your competitive environment. No more dealing with random lobbies, toxic public servers, or inconsistent settings.
- Full control — Set your own game rules, map rotations, round timers, and player limits
- Private access — Invite-only for team practice sessions, scrims, and organized matches
- Custom plugins and mods — Install SourceMod, MetaMod, practice configs, and custom game modes
- Consistent low ping — Choose a server location closest to your team for the best possible latency
- Always online — No dependency on your home PC being powered on and connected
- Static IP — Your team always connects to the same address, no dynamic DNS headaches
VPS vs local hosting: Running a CS2 server on your home machine ties up your bandwidth and resources while you play. A VPS gives you 24/7 uptime, a static IP, better network routing, and keeps your gaming PC free for actually playing.
// 2. VPS vs Dedicated Server — Which Do You Need?
The answer depends on your community size and how heavily you plan to mod your server.
◆ VPS (Recommended for Most)
Sufficient for 10-20 players. Cost-effective, easy to scale, and simple to manage. Start with VPS Medium and upgrade if your community grows. Perfect for team practice, casual matches, and small communities.
◆ Dedicated Server
A physical machine reserved entirely for you. Only needed for large communities (20+ players), heavy plugin stacks, tournament-level setups with SourceTV broadcasting, or running multiple game servers simultaneously.
For the vast majority of CS2 server operators, a VPS is the right choice. You get dedicated resources, root access, and the flexibility to scale up when needed — without paying for hardware you don't use.
// 3. Server Requirements
CS2 is more resource-hungry than CS:GO was. Here's what you need based on your setup:
| Setup |
RAM |
CPU |
Storage |
Recommended Plan |
| 8-10 players, casual |
4 GB |
3 vCPU |
40 GB SSD |
VPS Medium ($39.99/mo) ★ |
| 10-16 players, competitive |
4-6 GB |
3 vCPU |
40 GB SSD |
VPS Medium ($39.99/mo) |
| 20+ players, plugins + SourceTV |
8 GB |
4 vCPU |
50 GB SSD |
VPS Premium ($64.99/mo) |
Storage is important — the CS2 dedicated server files alone are approximately 35 GB. You'll want headroom for logs, demos, plugins, and OS overhead.
Our recommendation: VPS Medium ($39.99/mo) handles 10-16 player servers comfortably. If you're running a larger community with plugins, SourceTV, or multiple game modes, go with VPS Premium ($64.99/mo) for 8 GB RAM and 50 GB SSD.
CPU:
████████████░░░░
Xeon 3x2.20 GHz
DRIVE:
████████░░░░░░░░
40 GB SSD
BANDWIDTH:
████████████████
Unmetered
1GBPS PORT
WEEKLY BACKUP
KVM
Order Now
CPU:
████████████████
Xeon 4x2.20 GHz
DRIVE:
██████████░░░░░░
50 GB SSD
BANDWIDTH:
████████████████
Unmetered
1GBPS PORT
WEEKLY BACKUP
KVM
Order Now
// 4. Step-by-Step: Set Up a CS2 Dedicated Server
1
Order Your VPS
Want it pre-installed? Select "Other (Raise a Ticket)" from the OS dropdown and mention "CS2 dedicated server" in your ticket. We'll deliver your VPS with SteamCMD installed, CS2 downloaded, and a basic server.cfg ready — just add your GSLT token and start playing. No extra cost.
Prefer to set it up yourself? Choose Ubuntu 22.04 LTS as your OS and follow along.
- Head to our VPS Hosting page and select VPS Medium or VPS Premium
- Choose Ubuntu 22.04 LTS as your operating system
- Pick a location closest to where your team plays
- Complete checkout (we accept Bitcoin via BTCPay!)
2
Initial Server Setup
Once your VPS is provisioned, connect via SSH and prepare the system:
ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y
adduser cs2user
usermod -aG sudo cs2user
su - cs2user
Pro tip: Always run game servers under a dedicated non-root user. This limits the damage if your server is ever compromised.
3
Install SteamCMD
SteamCMD is Valve's command-line tool for downloading and updating dedicated server files.
sudo apt install lib32gcc-s1 -y
mkdir -p ~/steamcmd && cd ~/steamcmd
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar -xvzf steamcmd_linux.tar.gz
4
Download CS2 Server
./steamcmd.sh
force_install_dir /home/cs2user/cs2server
login anonymous
app_update 730
quit
Note: The download is approximately 35 GB. This will take a while depending on your server's bandwidth. On a 1 Gbps port, expect 15-30 minutes.
5
Configure Your Server
Create the server configuration file:
mkdir -p ~/cs2server/game/csgo/cfg
nano ~/cs2server/game/csgo/cfg/server.cfg
Add a minimal server.cfg to get started:
hostname "My DejavuHost CS2 Server"
sv_maxplayers 10
sv_password "your_server_password"
sv_cheats 0
sv_lan 0
You can customize these settings further once your server is running. Common additions include round timers, friendly fire settings, and map rotation configs.
6
Get a Game Server Login Token (GSLT)
A GSLT is required for your server to appear in the public server browser and accept connections from external players.
- Go to Steam Game Server Account Management
- Log in with your Steam account
- Create a new game server account with App ID 730
- Copy the generated token — you'll need it for the launch command
Important: GSLT is mandatory for your server to be visible to external players. Without it, only LAN connections work. Each token is tied to one server instance.
7
Fix Required Symlinks and Launch
CS2 requires the Steam Linux Runtime and a few symlinks to function properly:
cd ~/steamcmd
./steamcmd.sh +login anonymous +app_update 1628350 validate +quit
ln -sfn ~/cs2server/game/bin/linuxsteamrt64/libv8.so \
~/cs2server/game/csgo/bin/linuxsteamrt64/libv8.so
mkdir -p ~/.steam/sdk64
ln -sfn ~/steamcmd/linux64/steamclient.so ~/.steam/sdk64/steamclient.so
cd ~/cs2server
~/Steam/steamapps/common/SteamLinuxRuntime_sniper/run -- \
./game/cs2.sh -dedicated \
+sv_setsteamaccount YOUR_GSLT_TOKEN \
+map de_dust2 -maxplayers 10 \
+exec server.cfg
If everything is configured correctly, you'll see the server initialize and load the map. The console will display "VAC secure mode is activated" when it's ready for connections.
8
Open Firewall Ports
Allow the required game traffic through your firewall:
sudo ufw allow 27015/udp
sudo ufw allow 27020/udp
sudo ufw enable
Pro tip: Port 27015 UDP is the essential one. Only open 27020 if you plan to use SourceTV for broadcasting matches. Keep everything else closed.
// 5. Autostart with systemd
Set up a systemd service so your CS2 server starts automatically on boot and restarts if it crashes:
sudo nano /etc/systemd/system/cs2.service
Paste the following service configuration:
[Unit]
Description=CS2 Dedicated Server
After=network.target
[Service]
Type=simple
User=cs2user
WorkingDirectory=/home/cs2user/cs2server
ExecStart=/home/cs2user/cs2server/game/bin/linuxsteamrt64/cs2 -dedicated \
+sv_setsteamaccount YOUR_GSLT \
+map de_dust2 -maxplayers 10 \
+exec server.cfg
Restart=on-failure
[Install]
WantedBy=multi-user.target
Enable and start the service:
sudo systemctl daemon-reload
sudo systemctl enable cs2
sudo systemctl start cs2
sudo systemctl status cs2
Your CS2 server will now start automatically whenever the VPS boots and restart itself if it crashes. Use sudo systemctl stop cs2 to stop it and sudo journalctl -u cs2 -f to tail the logs.
// 6. Connecting to Your Server
Once your server is running, there are two ways to connect:
◆ Via Console
Open CS2, go to Settings > Game and enable the Developer Console. Press ~ (tilde) to open the console and type: connect YOUR_SERVER_IP:27015
◆ Via Steam Server Browser
In Steam, go to View > Game Servers > Favorites. Click "Add a Server" and enter your server IP with port: YOUR_SERVER_IP:27015
Share your server IP with your team and they can connect using either method. If you set a password in your server.cfg, they'll need that too.
// 7. Pre-Installation & Custom Setup
Not everyone wants to SSH into a server and run commands. We get it — and that's exactly why DejavuHost offers pre-installation at no extra cost.
- During checkout, select "Other (Raise a Ticket)" from the OS dropdown
- In your ticket, mention "CS2 dedicated server"
- Complete your order as normal
- We'll deliver your VPS with everything set up: SteamCMD installed, CS2 downloaded, server.cfg configured, and systemd autostart enabled
- You add your GSLT token, invite your team, and start playing
This service also works for other game servers. Whether it's Minecraft, ARK, Valheim, Palworld, or anything else — tell us what you need and we'll set it up. No extra cost, no hassle.
// 8. Troubleshooting
Common issues and their fixes:
◆ Error 0x202 on Install
Clear the SteamCMD cache and retry: rm -rf ~/steamcmd/package ~/steamcmd/steamapps. Then re-run the installation commands from Step 4.
◆ Server Won't Start
Verify your GSLT token is valid and hasn't expired. Check that the libv8.so symlink exists. Make sure you're launching with the Steam Linux Runtime wrapper.
◆ Players Can't Connect
Ensure ports 27015 and 27020 are open in UFW. Verify the server isn't password-locked unintentionally. Check that sv_lan is set to 0 in server.cfg.
◆ Server Crashes on Startup
Install the Steam Linux Runtime (app 1628350) if you haven't already. Verify all symlinks from Step 7 are correctly in place. Check journalctl -u cs2 for error details.
// 9. Wrap-Up
A dedicated CS2 server gives your team consistent practice with zero lag, full control over settings, and a private environment for scrims and competitive play.
- VPS Medium ($39.99/mo) handles 10-16 players comfortably — the best starting point for most teams
- VPS Premium ($64.99/mo) for serious communities running plugins, SourceTV, and 20+ player lobbies
- Or let us handle everything — pre-installed and ready to play, no extra cost
Pick your plan, follow the steps above (or let us do it for you), and your team will be fragging on your own server tonight.