Skip to content

Dedicated Servers ​

You can setup dedicated servers in three different ways:

  1. Using a game server node via the panel. Learn more about dedicated servers on game server nodes
  2. Using the plugin which will require manual upload of the plugin and configuration of the game server. Learn more about using the plugin
  3. Using the container which will require a Docker installation and a Docker Compose file. Learn more about using game server container

The last two are external servers: in the panel's dedicated server form, pick External Server under Where It Runs and enter the server's host, Game Port and TV Port. Once it exists, the server's page shows the config to copy onto the machine.

Which plugin does it need? ​

That depends on what the server plays:

ServerPlugin to install
Ranked ServerThe 5Stack match plugin, below. See Game Plugin Configuration
Valve Modes (a community server)The Player Management plugin, which enforces bans, mutes, gags and access lists and reports players for the server's stats

Custom Presets (game modes) need a game server node, because 5Stack installs the mode's plugins onto the server. The same goes for map rotation and per-server plugins. An external community server still gets access lists, player management and stats.

The match plugin ​

The 5Stack Game Server Plugin ships for two CS2 frameworks. Pick one, then download its latest release and follow that framework's install guide:

See Game Plugin Runtimes for how the two differ.

WARNING

The server must be started with -usercon, and -ip 0.0.0.0 to allow remote rcon, and with -allow_round_backup_files so rounds can be restored. See Round backups.

Using the Container ​

Here's an example Docker Compose file for running a Counter-Strike dedicated server. Both runtime images take the same environment variables and scripts, so swap game-server-sw for game-server-css if you want CounterStrikeSharp instead:

version: '3.8'

services:
  update-server:
    image: ghcr.io/5stackgg/game-server-sw:latest
    container_name: update-server
    command: ["/opt/scripts/update.sh"]
    volumes:
      - /opt/5stack/steamcmd:/serverdata/steamcmd
      - /opt/5stack/serverfiles:/serverdata/serverfiles
    restart: no
  dev-cs-server:
    image: ghcr.io/5stackgg/game-server-sw:latest
    container_name: dev-cs-server
    environment:
      - DEV_SERVER=true
      - SERVER_PORT=27015
      - TV_PORT=27020
      - EXTRA_GAME_PARAMS=-maxplayers 13
      - ALLOW_BOTS=true
      - WS_DOMAIN=wss://ws.5stack.gg
      - API_DOMAIN=https://api.5stack.gg
      - DEMOS_DOMAIN=https://demos.5stack.gg
      - SERVER_ID=<your-server-id>
      - SERVER_API_PASSWORD=<your-server-api-password>
    ports:
      - "27015:27015/tcp"
      - "27015:27015/udp"
      - "27020:27020/tcp"
      - "27020:27020/udp"
    volumes:
      - /opt/5stack/steamcmd:/serverdata/steamcmd
      - /opt/5stack/serverfiles:/serverdata/serverfiles
      - /opt/5stack/demos:/opt/demos
    deploy:
      resources:
        limits:
          memory: 10Gi

After a Counter-Strike update. You will need to run docker-compose run --rm update-server to download and install the latest version of the game.

A community server from the container ​

The container defaults to a Ranked server with the match plugin. For a community server, swap the match plugin for the Player Management plugin, which is in the same image and reads the same API_DOMAIN, SERVER_ID and SERVER_API_PASSWORD variables:

    environment:
      - SERVER_TYPE=Casual
      - INSTALL_5STACK_PLUGIN=false
      - INSTALL_PLAYER_MANAGEMENT_PLUGIN=true

Round backups ​

CS2 saves a backup file for every round, and the match plugin restores a match to an earlier round from them, after a crash or from the match page. Since the CS2 update of 14 October 2026, the game only writes and loads them when the server is started with -allow_round_backup_files. Without it matches still play, but there is nothing to restore.

Only Ranked and Competitive servers need it. Other modes don't restore rounds and start without it.

ServerWhat to do
Match servers the panel startsNothing, the game server image passes the flag
Ranked and Competitive dedicated servers on a game server nodeRestart the server once so it starts on the updated image
The containerPull the latest image (docker-compose pull) and recreate the container. It passes the flag when SERVER_TYPE is Ranked (the default) or Competitive
A Ranked or Competitive server you run yourself with a pluginAdd -allow_round_backup_files to its launch options

Hibernation ​

CS2 can put an empty server to sleep with sv_hibernate_when_empty 1 until somebody connects. From plugin versions sw-v0.0.96 and css-v0.0.441, a hibernating server keeps reporting to the panel, and wakes itself when it is given a match. From sw-v0.0.97 and css-v0.0.442, the server's page shows Hibernating instead of a warning. A community server keeps syncing while it sleeps, but never shows as Hibernating.

Which servers may hibernate:

ServerHibernates?
On-demand match serversNever
Practice serversNever: they are always started with hibernation off
Ranked serversOff, unless the container is started with HIBERNATE_WHEN_EMPTY=true. The panel never sets it on servers it runs on a node
Community serversWhatever their own cfg/server.cfg says. 5Stack seeds that file on first boot with sv_hibernate_when_empty 1; on a node, edit it from the server's Files

So a container left on its default SERVER_TYPE=Ranked starts with hibernation off. Turn it on with one more environment variable:

    environment:
      - HIBERNATE_WHEN_EMPTY=true

A server you run yourself with the plugin follows whatever its own server.cfg sets.

WARNING

Older plugin versions go quiet while the server hibernates. Update the plugin, or keep sv_hibernate_when_empty 0.

TIP

This has been run on SwiftlyS2. The CounterStrikeSharp plugin carries the same changes but has seen less testing.