Skip to content

kopkaa/cs2-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ CS2 Server on Hetzner - Terraform & Ansible

Complete automated setup of Counter-Strike 2 server on Hetzner Cloud for casual gaming with friends.

๐Ÿš€ Quick Start

cd terraform/
cp terraform.tfvars.example terraform.tfvars

# 2. Create infrastructure
terraform init
terraform apply

# 3. Deploy CS2 server
cd ../ansible/
nano inventory.yml  # set IP address
ansible-playbook -i inventory.yml playbook.yml

๐Ÿ“‹ Requirements

  • Hetzner Cloud account + API token
  • Terraform installed
  • Ansible installed
  • SSH key (~/.ssh/)

๐ŸŽฏ What You Get

โœ… Automatically configured VPS (Ubuntu 22.04) โœ… Counter-Strike 2 dedicated server โœ… Metamod:Source + CounterStrikeSharp (plugin framework) โœ… AIM maps (Dust2, Mirage, custom aim maps) โœ… Admin plugins (kick, ban, map change) โœ… Systemd service (auto-restart on crash) โœ… Firewall (SSH + CS2 ports)

๐Ÿ—บ๏ธ Pre-installed Maps

Map rotation:

  • de_dust2 - Classic
  • de_mirage - Popular competitive
  • aim_map - Custom AIM training

Maps automatically rotate after each match.

๐Ÿ› ๏ธ Useful Commands

# Ansible
ansible-playbook -i inventory.yml playbook.yml  # Deploy

# Server management
ssh root@YOUR-IP
sudo systemctl status cs2-server
sudo systemctl restart cs2-server
sudo journalctl -u cs2-server -f  # Logs

๐ŸŽฎ Server Control

Connect via RCON (from CS2 console):

rcon_password zmensito123
rcon status
rcon changelevel de_mirage
rcon say "Hello everyone!"

Change map (SSH):

ssh root@YOUR-IP
# Use RCON commands from server console

๐Ÿ”Œ Plugins for CS2

Server comes with pre-installed:

  • CounterStrikeSharp - Plugin framework for CS2
  • Metamod:Source - Base for plugins

How to add plugins:

  1. Find plugin for CounterStrikeSharp
  2. Download .dll file
  3. Upload to /home/steam/cs2/game/csgo/addons/counterstrikesharp/plugins/
  4. Restart server

Recommended plugins:

  • CSS Admin - Admin commands
  • Map Chooser - Map voting
  • Deathmatch - Respawn mode

๐Ÿ“š Resources

๐Ÿ“ License

Free to use, modify and distribute. Have fun! ๐ŸŽฎ


Made with โค๏ธ for the CS2 community

About

Hetzner Cloud Server configuration and deployment for CS2

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published