How to Install a Counter-Strike: Global Offensive (CS:GO) Server on Ubuntu Server (22.04/24.04)

By Virgil on May 4, 2025 | howtos


How to Install a Counter-Strike: Global Offensive (CS:GO) Server on Ubuntu Server (22.04/24.04)

 

Hosting your own CS:GO dedicated server on a Cloudnium VPS is a great way to play custom matches with friends, run tournaments, or build a public community. This guide walks you through installing and running a CS:GO server on Ubuntu 22.04 or 24.04. 

 


✅ Prerequisites

Before getting started:

  • Ubuntu Server 22.04 or 24.04 (64-bit)

  • At least 2 CPU cores, 4GB RAM, and 15GB+ disk space

  • A Steam account (needed to get a SteamCMD login token)

  • A non-root user with sudo privileges

  • Open ports: 27015 UDP, 27020 UDP, and optionally 27005 UDP (for client communication)


🧱 Step 1: Install Required Packages

First, update your server and install dependencies:

bash
sudo apt update && sudo apt upgrade -y sudo apt install lib32gcc-s1 steamcmd screen unzip curl wget -y

If steamcmd is not available on your distro, you can manually install it later.


📁 Step 2: Create a Server User (Optional but Recommended)

Run the server under a separate user for security:

bash
sudo adduser --disabled-login csgo sudo su - csgo

📥 Step 3: Install SteamCMD

If not installed from APT, install it manually:

bash
mkdir ~/steamcmd cd ~/steamcmd wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz tar -xvzf steamcmd_linux.tar.gz

🎮 Step 4: Download CS:GO Dedicated Server

Create a directory for the CS:GO server:

bash
mkdir ~/csgo-ds

Launch SteamCMD and install the server:

bash
~/steamcmd/steamcmd.sh

Once inside SteamCMD, run the following (replace YOURLOGIN with anonymous or your Steam credentials if needed):

pgsql
login anonymous force_install_dir ./csgo-ds app_update 740 validate quit

This will download the CS:GO Dedicated Server into ~/csgo-ds.


⚙️ Step 5: Create a Startup Script

Navigate to your server folder:

bash
cd ~/csgo-ds

Create a launch script:

bash
nano start.sh

Paste the following into it:

bash
#!/bin/bash ./srcds_run -game csgo -console -usercon +game_type 0 +game_mode 1 +map de_dust2 -tickrate 128 +sv_setsteamaccount YOUR_GSLT

Replace YOUR_GSLT with your Game Server Login Token from https://steamcommunity.com/dev/managegameservers

Make the script executable:

bash
chmod +x start.sh

🔒 Step 6: Open Firewall Ports

Enable required ports:

bash
sudo ufw allow 27015/udp sudo ufw allow 27020/udp sudo ufw allow 27005/udp sudo ufw reload

🚀 Step 7: Start the Server

Start your server with:

bash
./start.sh

Or use screen to keep it running in the background:

bash
screen -S csgo ./start.sh

To detach: Ctrl + A, then D
To reattach: screen -r csgo


🧠 Tips and Config

Your configuration files can be found under:

bash
csgo/cfg/server.cfg

To create or modify server settings (e.g., hostname, RCON password, max players), edit this file:

bash
nano ~/csgo-ds/csgo/cfg/server.cfg

Example contents:

nginx
hostname "My CS:GO Server" rcon_password "changeme" sv_password "" sv_cheats 0 maxplayers 12

🏁 You're Ready!

Your CS:GO server should now be live! Friends can connect using your server’s public IP address and port 27015.


Share this article: Twitter Facebook LinkedIn