No description
  • Shell 76.3%
  • Dockerfile 23.7%
Find a file
2026-04-06 17:45:11 -04:00
.dockerignore Initial commit 2025-11-08 13:15:49 -05:00
.gitlab-ci.yml Initial commit 2025-11-08 13:15:49 -05:00
debian-x64-nonroot.Dockerfile move to nonroot and make a root version 2025-11-08 13:27:03 -05:00
debian-x64.Dockerfile make first start no valid, update file only, -beta x86-64 flag 2025-11-08 14:58:02 -05:00
README.md Update README.md 2025-11-08 16:19:32 -05:00
start-nonroot.sh fix some other issues after researching steam stinkycd 2026-04-06 17:45:11 -04:00
start.sh fix some other issues after researching steam stinkycd 2026-04-06 17:45:11 -04:00
update.sh stale manifests issue 2026-04-06 17:25:50 -04:00

Garry's Mod Docker for MCSManager

Garry's Mod dedicated server for MCSManager with runtime downloads.

Docker Hub: https://hub.docker.com/r/cr8ns/gmod-mcs

Features

  • Runtime server download to /data (MCSManager compatible)
  • Runs as root for mounted volume compatibility
  • SteamCMD at /home/steam/steamcmd (separate from server files)
  • Debian Bookworm base (modern, stable)
  • x64 server support
  • Optional CSS content
  • Workshop collection support
  • Configurable via environment variables

Quick Start

Pull from Docker Hub:

docker pull cr8ns/gmod-mcs:latest

Or build locally:

docker build -f debian-x64.Dockerfile -t cr8ns/gmod-mcs .

Environment Variables

Variable Default Description
SERVER_DIR /data Server installation directory
MAXPLAYERS 16 Maximum players
GAMEMODE sandbox Game mode
MAP gm_construct Starting map
PORT 27015 Server port
TICKRATE 66 Server tickrate
HOSTNAME Garry's Mod Server Server name
RCON_PASSWORD `` RCON password (empty = disabled)
SV_REGION 255 Server region (255 = world)
INSTALL_CSS true Download CSS content
WORKSHOP_ID `` Workshop collection ID
WORKSHOP_AUTHKEY `` Workshop auth key
ARGS `` Additional server arguments

Usage

MCSManager

MCSManager mounts instance data to /data.

  • First run: Downloads server (~5-10 min)
  • Restarts: Instant startup, no updates
  • Updates: Use update.sh via terminal or schedule manually

Docker Run

docker run -d \
  -v $PWD/server:/data \
  -p 27015:27015 \
  -p 27015:27015/udp \
  -e MAXPLAYERS=32 \
  -e GAMEMODE=darkrp \
  -e MAP=rp_downtown_v4c_v2 \
  -e HOSTNAME="My Server" \
  -e RCON_PASSWORD=secret123 \
  cr8ns/gmod-mcs:latest

Workshop Collections

docker run -d \
  -v $PWD/server:/data \
  -p 27015:27015/udp \
  -e WORKSHOP_ID=123456789 \
  -e WORKSHOP_AUTHKEY=your_key_here \
  cr8ns/gmod-mcs:latest

Manual Update

Execute inside running container:

docker exec -it container_name /home/steam/update.sh

Or from host:

docker exec container_name /home/steam/update.sh

Directory Structure

/home/steam/steamcmd/    # SteamCMD (in image)
/data/                   # Server files (runtime)
  ├── srcds_run_x64
  ├── garrysmod/
  │   ├── addons/
  │   ├── cfg/
  │   └── gamemodes/
  └── cstrike/           # Optional CSS content

Persistence

Everything in /data persists:

  • Server files
  • Addons
  • Configs
  • Game modes
  • Player data
  • Logs

Ports

  • 27015/tcp - Game server
  • 27015/udp - Game server (main)
  • 27005/udp - Server browser/RCON

Region Codes

Code Region
0 US East
1 US West
2 South America
3 Europe
4 Asia
5 Australia
6 Middle East
7 Africa
255 World

Notes

  • First startup: 5-10 minutes (server download)
  • Subsequent starts: Instant (no auto-update)
  • Updates: Manual only via update.sh script
  • Disk space: ~5GB for server files
  • Container starts as root for MCSManager volume compatibility
  • Server process runs as steam user (safe, no warnings)
  • SteamCMD commands execute as steam user via su
  • SteamCMD separate from server for MCSManager compatibility
  • set -e in scripts exits on any error
  • CSS content optional via INSTALL_CSS=false