Railway

Deploy CS2

CS2 Dedicated Server — 30GB+ volume, CSTV, zero-downtime updates

Deploy CS2

Just deployed

/home/steam/cs2-dedicated

Deploy and Host

Deploy on Railway

Counter-Strike 2 Dedicated Server — one-click deploy with persistent volume, CSTV support, and zero-downtime updates. Powered by joedwards32/CS2.

After deploying, open CS2 → Play → Community Server Browser → Add Server: :27015

System Requirements

  • Disk: 30GB+ dedicated volume (CS2 base install ~20GB, grows with maps/workshop content)
  • Memory: 2 GB RAM minimum (4 GB+ recommended for >10 players)
  • Network: UDP port 27015 (game), TCP port 27020 (CSTV, optional)
  • Steam: Valid Game Server Login Token required

About Hosting

This template runs a CS2 dedicated server wrapped around the upstream Docker image. Game data persists on a Railway volume mounted at /home/steam/cs2-dedicated — configs, maps, and logs survive deploys and restarts.

The entrypoint runs as root on boot to chown the Railway volume (root-owned by default) to the steam user, then drops privileges before launching the server. Railway uses TCP port 27015 for healthchecks since the game port is UDP and Railway doesn't support UDP healthchecks.

Prerequisites:

Key environment variables:

VariableDefaultDescription
SRCDS_TOKENrequiredSteam Game Server Login Token
CS2_SERVERNAMEcs2 private serverServer hostname
CS2_MAXPLAYERS10Max simultaneous players
CS2_RCONPWchangemeRCON password
CS2_STARTMAPde_infernoStarting map
CS2_MAPGROUPmg_activeMap group
CS2_GAMETYPE0Game type (0=Classic, 1=Arms Race, 2=Demolition)
CS2_GAMEMODE1Game mode (0=Casual, 1=Competitive, 2=Wingman)
CS2_CHEATS0Enable cheats (0=off, 1=on)
TV_ENABLE0Enable CSTV/SourceTV (0=off, 1=on)
TV_PORT27020CSTV port

Ports

PortProtocolDescription
27015UDPGame port
27015TCPRCON (if enabled)
27020UDPCSTV/SourceTV

Why Deploy

  • Persistent game data: configs, maps, and logs survive deploys via Railway volume
  • Zero-downtime updates: redeploy without losing server state
  • SourceTV support: broadcast matches with built-in CSTV
  • Full config control: 32+ env vars for maps, gamemodes, logging, and more

Common Use Cases

  • Host a competitive CS2 server for ranked practice
  • Run a private community server with custom maps and mods
  • Set up a CSTV relay for tournament broadcasting
  • Test custom configs and gamemodes without local Docker setup

Dependencies for

This template has no external service dependencies — everything runs in a single container with a persistent volume.

Deployment Dependencies

  • A Railway account
  • A Steam Game Server Login Token (free from steamcommunity.com)

Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
44
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51