{"id":19542901,"url":"https://github.com/mustansirzia/csgo-dedicated-server","last_synced_at":"2026-04-13T01:04:01.101Z","repository":{"id":126419786,"uuid":"299665483","full_name":"MustansirZia/csgo-dedicated-server","owner":"MustansirZia","description":"A containerized dedicated server for Counter-Strike: Global Offensive.","archived":false,"fork":false,"pushed_at":"2023-07-10T15:52:07.000Z","size":133,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-08T18:53:31.960Z","etag":null,"topics":["csgo","csgo-server","docker","docker-compose","linux","metamod","shell","sourcemod"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MustansirZia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-29T15:52:24.000Z","updated_at":"2024-03-07T19:44:52.000Z","dependencies_parsed_at":"2024-12-03T03:35:59.096Z","dependency_job_id":"95155f86-8991-4dfb-a967-5c2729beabbe","html_url":"https://github.com/MustansirZia/csgo-dedicated-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MustansirZia%2Fcsgo-dedicated-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MustansirZia%2Fcsgo-dedicated-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MustansirZia%2Fcsgo-dedicated-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MustansirZia%2Fcsgo-dedicated-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MustansirZia","download_url":"https://codeload.github.com/MustansirZia/csgo-dedicated-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240796976,"owners_count":19859102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csgo","csgo-server","docker","docker-compose","linux","metamod","shell","sourcemod"],"created_at":"2024-11-11T03:16:31.208Z","updated_at":"2026-04-13T01:04:01.051Z","avatar_url":"https://github.com/MustansirZia.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CSGO containerized\n\n\u003cbr /\u003e\n\u003cp align=\"middle\"\u003e\n\u003cimg src=\"logos/logo.png\" alt=\"logo\" width=\"250\"\u003e\n\u003cimg src=\"logos/docker-logo.png\" alt=\"docker-logo\" width=\"250\"\u003e\n\u003c/p\u003e\n\u003cbr /\u003e\n\n\nThe Dockerfile will build an image for running a Counter-Strike: Global Offensive dedicated server in a container. (\u003cb\u003eGL HF!\u003c/b\u003e)\n\nBase Image - [https://github.com/kaimallea/csgo](https://github.com/kaimallea/csgo)\n\nThe following addons and plugins are included by default:\n\n- [Metamod](https://www.sourcemm.net/)\n- [SourceMod](https://www.sourcemod.net/)\n- [SteamWorks](https://forums.alliedmods.net/showthread.php?t=229556)\n- [PTaH](https://github.com/komashchenko/PTaH)\n- [Updater](https://bitbucket.org/GoD_Tony/updater/downloads/updater.smx)\n- [PugSetup](https://github.com/splewis/csgo-pug-setup)\n- [Practice Mode](https://github.com/splewis/csgo-practice-mode)\n- [Retakes](https://github.com/splewis/csgo-retakes) (**disabled by default**)\n- [Weapons \u0026 Knives](https://github.com/kgns/weapons)\n- [Cow-Anti-Cheat](https://github.com/eedson/Cow-Anti-Cheat)\n- [Advertisements](https://github.com/ErikMinekus/sm-advertisements)\n- [TOGs Clan Tags](https://github.com/ThatOneHomelessGuy/togsclantags)\n- [CallAdmin](https://github.com/Impact123/CallAdmin)\n- [Discord](https://gitlab.com/Zipcore/Discord)\n- [Simple-CSGO-Ranks](https://github.com/ArclightHub/Simple-CSGO-Ranks) \n\nTo get a 10man/gather going, simply connect and type `.setup` in chat. Practice Mode should also be available from the menu.\n\nRetakes is disabled by default. To enable it, set the environment variable `RETAKES=1` and restart the container. Use can later use the cvar `sm_retakes_enabled 0` to turn if off on-demand.\n\n## How to Use\n\n```bash\ndocker build -t csgo-server .\n```\n\nTo use the image as-is, run it with a few useful environment variables to configure the server:\n\n```bash\ndocker run \\\n  --rm \\\n  --interactive \\\n  --tty \\\n  --detach \\\n  --mount source=csgo-data,target=/home/steam/csgo \\\n  --network=host \\\n  --env \"SERVER_HOSTNAME=hostname\" \\\n  --env \"SERVER_PASSWORD=password\" \\\n  --env \"RCON_PASSWORD=rconpassword\" \\\n  --env \"STEAM_ACCOUNT=gamelogintoken\" \\\n  --env \"AUTHKEY=webapikey\" \\\n  --env \"SOURCEMOD_ADMINS=STEAM_1:0:123456,STEAM_1:0:654321\" \\\n  csgo-server\n```\n\nWould you rather use a bind volume so that you can access file contents directly? Use `--mount type=bind,source=$(pwd),target=/home/steam/csgo` instead of the one in the example above.\n\nThere's also an option to use [docker-compose](https://docs.docker.com/compose).\n\n```bash\ndocker-compose up -d\n```\n\nIf you plan on managing plugins manually with a bind volume, you might want pass an empty or reduced `INSTALL_PLUGINS` environment variable to prevent conflicts (see below for default value of `INSTALL_PLUGINS`).\n\n\n### Required Game Login Token\n\nThe `STEAM_ACCOUNT` is a \"Game Login Token\" required by Valve to run public servers. Confusingly, this token is also referred to as a steam account (it's set via `sv_setsteamaccount`). To get one, visit https://steamcommunity.com/dev/managegameservers. You'll need one for each server.\n\n### Optional Steam Web API Key for Workshop Content\n\nTo access maps and collections from the Workshop, you need to provide a Steam Web API key. You can provide this via the evironment variable `AUTHKEY` and it will be passed to the command-line as `-authkey \u003ckey\u003e`.\n\nIf you don't have a key you can generate one at http://steamcommunity.com/dev/apikey.\n\nWith a key set, you can also use the environment variables `HOST_WORKSHOP_COLLECTION` and `WORKSHOP_START_MAP` to specify a workshop collection and start the server with a workshop map, respectively.\n\nFor more information check out the [Valve developer wiki page](https://developer.valvesoftware.com/wiki/CSGO_Workshop_For_Server_Operators#How_to_host_Workshop_Maps_with_a_CS:GO_Dedicated_Server).\n\n### SourceMod admins\n\nThe optional `SOURCEMOD_ADMINS` environment variable is a comma-delimited list of Steam IDs. These will be added to SourceMod's admin list before the server is started.\n\n### Playing on LAN\n\nIf you're on a LAN, add the environment variable `LAN=1` (e.g., `--env \"LAN=1\"`) to have `sv_lan 1` set for you in the server.\n\n### Environment variable overrides\n\nBelow are the default values for environment variables that control the server configuration. To override, pass one or more of these to docker using the `-e` or `--env` argument (example above).\n\n```bash\nSERVER_HOSTNAME=Counter-Strike: Global Offensive Dedicated Server\nSERVER_PASSWORD=\nRCON_PASSWORD=changeme\nSTEAM_ACCOUNT=changeme\nAUTHKEY=changeme\nIP=0.0.0.0\nPORT=27015\nTV_PORT=27020\nTICKRATE=128\nFPS_MAX=300\nGAME_TYPE=0\nGAME_MODE=1\nMAP=de_dust2\nMAPGROUP=mg_active\nHOST_WORKSHOP_COLLECTION=\nWORKSHOP_START_MAP=\nMAXPLAYERS=12\nTV_ENABLE=1\nLAN=0\nSOURCEMOD_ADMINS=\nRETAKES=0\n```\n\n### PugSetup ConVars\n\nPugSetup's default configuration can also be controlled via environment variables. Any environment variables prefixed with `SM_PUGSETUP_` will have its corresponding cvar updated inside of `$CSGODIR/csgo/cfg/sourcemod/pugsetup.cfg`.\n\n**NOTE: `pugsetup.cfg` is automatically generated the first time the plugin is loaded. So you may have to restart the container after the first run so that the file exists.***\n\nFor example, if I wanted to enable set the cvars `sm_pugsetup_snake_captain_picks` and `sm_pugsetup_message_prefix`, I would set the following environment variables when starting the container:\n\n```bash\n  ...\n  --env \"SM_PUGSETUP_SNAKE_CAPTAIN_PICKS=2\" \\\n  --env \"SM_PUGSETUP_MESSAGE_PREFIX=[{YELLOW}Sesame Street{NORMAL}]\" \\\n  ...\n```\n\nThis would set these values in `$CSGODIR/csgo/cfg/sourcemod/pugsetup.cfg`:\n\n```bash\n...\nsm_pugsetup_snake_captain_picks \"2\"\nsm_pugsetup_message_prefix \"[{YELLOW}Sesame Street{NORMAL}]\"\n...\n```\n\n### Troubleshooting\n\nIf you're unable to use [`--network=host`](https://docs.docker.com/network/host/), you'll need to publsh the ports instead, e.g.:\n\n\n```bash\ndocker build -t csgo-server .\n```\n\n```bash\ndocker run \\\n  --rm \\\n  --interactive \\\n  --tty \\\n  --detach \\\n  --mount source=csgo-data,target=/home/steam/csgo \\\n  --publish 27015:27015/tcp \\\n  --publish 27015:27015/udp \\\n  --publish 27020:27020/tcp \\\n  --publish 27020:27020/udp \\\n  --publish 23:23/tcp \\\n  --env \"SERVER_HOSTNAME=hostname\" \\\n  --env \"SERVER_PASSWORD=password\" \\\n  --env \"RCON_PASSWORD=rconpassword\" \\\n  --env \"STEAM_ACCOUNT=gamelogintoken\" \\\n  --env \"AUTHKEY=webapikey\" \\\n  --env \"SOURCEMOD_ADMINS=STEAM_1:0:123456,STEAM_1:0:654321\" \\\n  csgo-server\n```\n\nThe game data is downloaded on first run (~26GB). Mount a volume to preserve game data if you need to recreate the container. The volume's target should be `/home/steam/csgo`. In these example I use a data volume, but you can use a bind volume as well since plugins are installed during container startup.\n\n### Overriding versions of SteamCMD, Metamod, SourceMod, and/or PugSetup\n\n#### SteamCMD\n\nSteamCMD is installed directly into the image at build time. To override the URL it installs from, pass in a build arg named `STEAMCMD_URL`:\n\n```bash\ndocker build \\\n  -t $(IMAGE_NAME) \\\n  --build-arg STEAMCMD_URL=https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz \\\n  .\n```\n\n#### Metamod, SourceMod, PugSetup, Retakes, etc\n\nAll plugins and extensions are installed during the startup of the container. This allows plugins can be managed via an environment variable.\n\nThe environment variable `INSTALL_PLUGINS` contains a space-delimited list of plugins to install. You can use newlines to delimit, they will be converted to spaces before processing. If you override this, make sure you include metamod and sourcemod or plugins that depend on them won't work.\n\n```bash\nINSTALL_PLUGINS=\"${INSTALL_PLUGINS:-https://mms.alliedmods.net/mmsdrop/1.10/mmsource-1.10.7-git971-linux.tar.gz\nhttps://sm.alliedmods.net/smdrop/1.10/sourcemod-1.10.0-git6478-linux.tar.gz\nhttps://github.com/splewis/csgo-pug-setup/releases/download/2.0.5/pugsetup_2.0.5.zip\nhttps://github.com/splewis/csgo-retakes/releases/download/v0.3.4/retakes_0.3.4.zip\nhttps://github.com/b3none/retakes-instadefuse/releases/download/1.4.0/retakes-instadefuse.smx\nhttps://github.com/b3none/retakes-autoplant/releases/download/2.3.0/retakes_autoplant.smx\nhttps://github.com/b3none/retakes-hud/releases/download/2.2.5/retakes-hud.smx\n}\"\n```\n\nLastly, a checksum is generated for each plugin's URL and is stored as `$CSGO_DIR/csgo/\u003cchecksum\u003e.marker` to prevent re-downloading plugins that have already been installed.\n\n### Adding your own configs, other files etc.\n\n#### Build time\n\nThe directory `containerfs` (container filesystem) is the equivalent of the steam user's home directory (`/home/steam`). The `csgo` game data lives in here. This means that any files you want to add, simply put them in the correct paths under `containerfs`, and they will appear in the Docker image relative to the steam user's home directory.\n\nIt is recommended to use `INSTALL_PLUGINS` environment variable at run time to install plugins, so that they are decoupled from the image.\n\nThere is also a special `containerfs/sourcemod_configs` folder which can contain configuration files for sourcemod plugins installed via `INSTALL_PLUGINS`. This allows us the ability to manually override configs for plugins installed via `INSTALL_PLUGINS`. This is how all the sourcemod plugins are configured right now.\n\n#### Run time\n\nSee `INSTALL_PLUGINS` above in the section above to learn about installing plugins.\n\nIf you're using a data volume, you can use the `docker cp` command to copy files from your host machine into the data volume.\n\nIf you're using a bind volume, you can copy files in directly. You may want to clear the `INSTALL_PLUGINS` variable if you want to manage everything manually.\n\n#### SSH Access\n\nFor convenience the image also houses an `openssh-server` which runs on port `23` inside the container. It allows for remote access for game admins or moderators that may want to change or add files while the server is running through clients such as FileZilla, CyberDuck, etc. It can also be used to get access via PuTTY in case game admins or moderators want to run one-off commands. By default password authentication is disabled and only pub key authentication (`.ssh/key_rsa`) is enabled.\n\n### Test Locally\n\nAfter building:\n\n1. Edit the exported environment variables in the `Makefile` to your liking\n2. Run `make server` to start a local LAN server to test\n3. Run `make test` to run tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmustansirzia%2Fcsgo-dedicated-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmustansirzia%2Fcsgo-dedicated-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmustansirzia%2Fcsgo-dedicated-server/lists"}