Creating a Counter-Strike 2 (CS2) game server on a Linux VPS with MetaMod and plugins is a fantastic way to enhance your gaming experience. This guide will walk you through the steps required to set up your server from scratch.
Step 1: Setting Up Your Linux VPS
Choose a VPS Provider: Select a reliable Linux VPS provider such as DigitalOcean, Linode, or Vultr. Make sure your VPS meets the system requirements for running a CS2 server.
Access Your VPS: Use SSH to connect to your VPS. Open your terminal and enter:
bash ssh username@your_vps_ip
Replaceusername
andyour_vps_ip
with your actual VPS username and IP address.
Step 2: Install Dependencies
Update Your System:
bash sudo apt update && sudo apt upgrade -y
Install Required Packages: Install packages necessary for running a CS2 server:
bash sudo apt install lib32gcc-s1 lib32stdc++6 screen wget
Step 3: Install SteamCMD
Download and Install SteamCMD:
bash cd ~ mkdir steamcmd cd steamcmd wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz tar -xvzf steamcmd_linux.tar.gz
Run SteamCMD:
bash ./steamcmd.sh
Step 4: Install CS2 Server
Log into SteamCMD: Inside the SteamCMD prompt, log in anonymously:
bash login anonymous
Set Up Server Directory: Specify the directory where your server files will be installed:
bash force_install_dir ./cs2_server/
Download CS2 Server: Now, download the CS2 server files:
bash app_update 730 validate quit
Step 5: Installing MetaMod
Download MetaMod: Visit the MetaMod website to download the latest version compatible with CS2.
Install MetaMod:
- Extract the downloaded files into the
cs2_server/cs/
directory. - Create the
metamod.vdf
file in thecs2_server/cs/
directory with the following content:plaintext "Plugin" { "file" "../addons/metamod/bin/server.so" }
- Extract the downloaded files into the
Step 6: Installing SourceMod
Download SourceMod: Visit SourceMod’s official site and download the latest version.
Install SourceMod:
- Extract the SourceMod files into the
cs2_server/cs/addons/
directory.
- Extract the SourceMod files into the
Step 7: Installing Plugins
Select Plugins: Choose plugins from the AlliedModders plugin repository. Some popular ones include:
- Admin tools (like Simple Admin)
- Game mode variations (like Zombie Mod or Gun Game)
- Stat tracking plugins
Configure Plugins:
- Navigate to
cs2_server/cs/addons/sourcemod/configs/
. - Edit the
plugins.ini
file to include your chosen plugins, each on a new line.
- Navigate to
Step 8: Configure Your Server
Edit Server Configuration: Open the
cs2_server/cs/cfg/server.cfg
file:bash nano cs/cfg/server.cfg
Set your desired server settings, such as:plaintext hostname "My CS2 Server" sv_password "" mp_maxplayers 16
Map Rotation: Edit the
cs2_server/cs/cfg/mapcycle.txt
file to specify the maps you want to cycle through:plaintext de_dust2 de_inferno cs_office
Step 9: Starting Your Server
Launch the Server: Use the following command to start your CS2 server:
bash cd cs2_server ./srcds_run -game cs -console -usercon +map de_dust2 +maxplayers 16
- This will start your server on the de_dust2 map with 16 slots.
Run in Background: To keep the server running in the background, consider using
screen
:bash screen -S cs2_server ./srcds_run -game cs -console -usercon +map de_dust2 +maxplayers 16
Detach from the screen session withCtrl+A
, thenD
.
Step 10: Managing Your Server
Connect to Your Server: Open CS2, go to the "Play" menu, and use the "Find a Game" option to locate your server by its IP address.
Server Commands: Use the server console to manage gameplay, changing maps or settings as needed.
Conclusion
Setting up a CS2 server with MetaMod and plugins on a Linux VPS is a rewarding process that allows for customized gameplay experiences. By following these steps, you’ll have a dedicated server ready for you and your friends to enjoy. If you have any questions or need assistance with specific configurations, feel free to ask! Enjoy gaming!