{"id":13696318,"url":"https://github.com/thetredev/steamcmd","last_synced_at":"2025-05-03T17:30:48.803Z","repository":{"id":38999677,"uuid":"497043701","full_name":"thetredev/steamcmd","owner":"thetredev","description":"Sane SteamCMD docker images!","archived":true,"fork":false,"pushed_at":"2024-09-18T17:20:12.000Z","size":224,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-28T04:35:12.202Z","etag":null,"topics":["container","counter-strike","counter-strike-2","counter-strike-source","csgo","docker","hlds","l4d-server","l4d2-server","left-for-dead","left-for-dead-2","left4dead","left4dead2","source","source-dedicated-server","source-engine","srcds","steamcmd","team-fortress-classic","tf2-server"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thetredev.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":"2022-05-27T15:16:51.000Z","updated_at":"2024-09-18T17:20:45.000Z","dependencies_parsed_at":"2023-12-01T02:37:26.505Z","dependency_job_id":"d2370142-6768-4176-8dab-5bf889ad440b","html_url":"https://github.com/thetredev/steamcmd","commit_stats":null,"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetredev%2Fsteamcmd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetredev%2Fsteamcmd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetredev%2Fsteamcmd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thetredev%2Fsteamcmd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thetredev","download_url":"https://codeload.github.com/thetredev/steamcmd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252226621,"owners_count":21714834,"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":["container","counter-strike","counter-strike-2","counter-strike-source","csgo","docker","hlds","l4d-server","l4d2-server","left-for-dead","left-for-dead-2","left4dead","left4dead2","source","source-dedicated-server","source-engine","srcds","steamcmd","team-fortress-classic","tf2-server"],"created_at":"2024-08-02T18:00:38.426Z","updated_at":"2025-05-03T17:30:48.335Z","avatar_url":"https://github.com/thetredev.png","language":"Shell","funding_links":[],"categories":["Gaming"],"sub_categories":["Game Servers - Docker"],"readme":"[![Build Status](https://img.shields.io/github/actions/workflow/status/thetredev/steamcmd/docker-latest.yml)](https://github.com/thetredev/steamcmd/actions)\n[![CodeFactor](https://www.codefactor.io/repository/github/thetredev/steamcmd/badge)](https://www.codefactor.io/repository/github/thetredev/steamcmd)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\n# Deprecation notice\n\nShamelessly copying the following note from https://github.com/dmadisetti/steam-tui/blob/main/README.md:\n\n\u003e [!NOTE]\n\u003e Steam no longer has a backend only mode.\n\nSo until further notice, this project is deprecated. I won't support requiring multiple gigabytes worth of packages (GUI stuff mostly, totalling to about ~ 4.5 last time I checked) just to run `steamcmd`.\n\nThe project will be archived for the time being to stop GitHub from triggering CI workflows.\n\nThis notice will be removed as soon as Valve has a backend only mode again, or someone finds a way how we can run `steamcmd` without these pointless dependencies.\n\n# Sane SteamCMD Docker images\nThis project aims to provide pre-packaged `SteamCMD` docker images which are up-to-date and especially easy to use.\n\nhttps://github.com/thetredev/steamcmd/assets/6085219/b7b807c0-3459-4522-89ed-343e4e2b3e8a\n\n# Table of Contents\n- [Differences to official images](#differences-to-official-images)\n  - [tmux session socket](#tmux-session-socket)\n  - [console input socket](#console-input-socket)\n  - [Base image](#base-image)\n  - [SSH server](#ssh-server)\n- [HLDS image](#hlds-image)\n  - [HLDS-based game servers](#hlds-based-game-servers)\n- [SRCDS image](#srcds-image)\n  - [SRCDS-based game servers](#srcds-based-game-servers)\n- [Source 2 image](#source-2-image)\n  - [Source 2 based game servers](#source-2-based-game-servers)\n- [Running multiple game servers](#running-multiple-game-servers)\n- [Kubernetes](#kubernetes)\n- [Image repositories](#image-repositories)\n- [Known bugs](#known-bugs)\n- [How to contribute?](#how-to-contribute)\n\n## Differences to official images\nWhile [the official images](https://github.com/steamcmd/docker) are fine, my take differs in a couple ways:\n\n### tmux session socket\nThese containers create a `tmux` session socket at `/tmp/steamcmd/session.sock`. If it is exposed to your local file system, you can use it to for example attach to the SteamCMD game server session:\n```\ntmux -S \u003c/path/to/bind-mounted/socket\u003e attach\n```\n\nTo expose the socket, just bind-mount the path (using `cs2` as an example):\n```yaml\nservices:\n  cs2:\n    ...\n    volumes:\n      - /tmp/steamcmd:/tmp/steamcmd\n    ...\n```\n\nWhich would translate to:\n```\ntmux -S /tmp/steamcmd/tmux.sock attach\n```\n\nBeware that `attach` is a `tmux` command! So you could also use `a` instead:\n```\ntmux -S /tmp/steamcmd/tmux.sock a\n```\n\nInstead of the `attach` command, you can use `send-keys` to execute a command directly within the game server's shell, say `bot kick`:\n```\ntmux -S /tmp/steamcmd/tmux.sock send-keys \"bot_kick\" \"Enter\"\n```\n\nUnfortunately there's no way currently to provide a shorthand for `send-keys` yet.\n\n### console input socket\n\nTo get around the `tmux` session syntax noise, I decided to create a Unix domain socket as well.\n\nTo type something in the SteamCMD game server console directly, you can use `netcat-openbsd` / `openbsd-netcat` like this:\n```\necho \"my server command\" | nc -UN /tmp/steamcmd/console.sock\n```\n\nTo expose the socket, just bind-mount the path (using `cs2` as an example):\n```yaml\nservices:\n  cs2:\n    ...\n    volumes:\n      - /tmp/steamcmd:/tmp/steamcmd\n    ...\n```\n\nThis socket makes it possible to forward console inputs from a web API or secure TCP socket for example.\n\n### Base image\n- Based on the official [`SteamRT v3 \"(Sniper)\"` image](https://gitlab.steamos.cloud/steamrt/sniper/platform) with all necessary dependencies and basic tools preinstalled\n- For legacy game servers (Source 1, non-CS 2 and HLDS) SteamRT v2 \"Soldier\" is used instead\n- The SteamCMD runtime error `[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.dll.` is fixed\n- It does not operate under the `root` user - a `steamcmd` user with default UID and GID of 5000 each is used instead\n- The server path is changed to `/var/lib/steamcmd/server`\n- `openssh-server` is installed to provide an easy and secure way of managing server files externally, even when using Kubernetes\n\n### SSH server\nSee the SSHD configuration at [`image/base/etc/ssh/sshd_config.d/steamcmd.conf`](image/base/etc/ssh/sshd_config.d/steamcmd.conf) for the options applied to the server. Only public key authentication is enabled!\n\nTo enable the SSH server, set the environment variables `STEAMCMD_SSH_SERVER_ENABLE` to `1` and `STEAMCMD_SSH_AUTHORIZED_KEYS` to the Base64 encoded public SSH keys separated by newlines (see [`compose/hlds/cs-ssh.yml`](compose/hlds/cs-ssh.yml) or [`compose/srcds/css-ssh.yml`](compose/srcds/css-ssh.yml)). `STEAMCMD_SSH_AUTHORIZED_KEYS` essentially represents the `~/.ssh/authorized_keys` file on the server side in encoded format.\n\nBase64-encode your public SSH keys:\n```shell\ncat \u003cssh-key1\u003e.pub \u003cssh-key2\u003e.pub \u003cssh-keyN\u003e.pub | base64 -w 0\n```\n\nThen use the output as the value for `STEAMCMD_SSH_AUTHORIZED_KEYS`.\n\n## HLDS image\n- Based on the [`base`](image/base) image\n- Provides a generic base for HLDS-based game servers\n- Provides the script [`server.sh (HLDS)`](image/hlds/usr/local/bin/server.sh) to manage game servers using a single `tmux` session\n- Provides a [`docker-entrypoint.sh`](image/base/usr/bin/docker-entrypoint.sh) which itself is executed as `root` with always-correct timezone and ownership of server files\n\nThe `server.sh` checks for the user executing it. If it's `root`, it executes itself as the `steamcmd` user via `exec gosu` to prevent ownership mismatch.\n\n### HLDS-based game servers\n- Composed via [`compose/hlds`](compose/hlds)\n- Game server specific environment variables are used for configuration\n\nCurrently supported game server images:\n\n| Game | Docker Image |\n| ---- | ---- |\n| Half-Life | `ghcr.io/thetredev/steamcmd:hlds-latest` |\n| Half-Life: Opposing Force | `ghcr.io/thetredev/steamcmd:hlds-latest` |\n| Counter-Strike | `ghcr.io/thetredev/steamcmd:hlds-latest` |\n| Counter-Strike: Condition Zero | `ghcr.io/thetredev/steamcmd:hlds-latest` |\n| Day of Defeat | `ghcr.io/thetredev/steamcmd:hlds-latest` |\n| Deathmatch Classic | `ghcr.io/thetredev/steamcmd:hlds-latest` |\n| Team Fortress Classic | `ghcr.io/thetredev/steamcmd:hlds-latest` |\n\n**Note**: Ricochet seems like it's not available anymore.\n\n## SRCDS image\n- Based on the [`base`](image/base) image\n- Provides a generic base for SRCDS-based game servers\n- `libstdc++`, `libtinfo` and other runtime errors due to missing dependencies are fixed\n- Provides the script [`server.sh (SRCDS)`](image/srcds/usr/local/bin/server.sh) to manage game servers using a single `tmux` session\n- Provides a [`docker-entrypoint.sh`](image/base/usr/bin/docker-entrypoint.sh) which itself is executed as `root` with always-correct timezone and ownership of server files\n- Tries to enable `128 tick` configurations by default. CS:S will default to 67 [because Valve said it's better this way (in 2010)](https://store.steampowered.com/oldnews/3976).\n\nThe `server.sh` checks for the user executing it. If it's `root`, it executes itself as the `steamcmd` user via `exec gosu` to prevent ownership mismatch.\n\n### SRCDS-based game servers\n- Composed via [`compose/srcds`](compose/srcds)\n- Game server specific environment variables are used for configuration\n\nCurrently supported game server images:\n\n| Game | Docker Image |\n| ---- | ---- |\n| Counter-Strike: Source | `ghcr.io/thetredev/steamcmd:srcds-latest` |\n| Day of Defeat: Source | `ghcr.io/thetredev/steamcmd:srcds-latest` |\n| Garry's Mod | `ghcr.io/thetredev/steamcmd:srcds-latest` |\n| Half Life 2: Deathmatch | `ghcr.io/thetredev/steamcmd:srcds-latest` |\n| Left 4 Dead | `ghcr.io/thetredev/steamcmd:srcds-latest` |\n| Left 4 Dead 2 | `ghcr.io/thetredev/steamcmd:srcds-latest` |\n\n## Source 2 image\n- Based on the [`base`](image/base) image\n- Provides a generic base for Source 2 based game servers\n- `libstdc++`, `libtinfo` and other runtime errors due to missing dependencies are fixed\n- Provides the script [`server.sh (SRCDS)`](image/srcds/usr/local/bin/server.sh) to manage game servers using a single `tmux` session\n- Provides a [`docker-entrypoint.sh`](image/base/usr/bin/docker-entrypoint.sh) which itself is executed as `root` with always-correct timezone and ownership of server files\n- Tries to enable `128 tick` configurations by default (Black Mesa: Deathmatch).\n\nThe `server.sh` checks for the user executing it. If it's `root`, it executes itself as the `steamcmd` user via `exec gosu` to prevent ownership mismatch.\n\n### Source 2 based game servers\n- Composed via [`compose/source2`](compose/source2)\n- Game server specific environment variables are used for configuration\n\nCurrently supported game server images:\n\n| Game | Docker Image |\n| ---- | ---- |\n| Black Mesa: Deathmatch | `ghcr.io/thetredev/steamcmd:source2-latest` |\n| Counter-Strike 2 | `ghcr.io/thetredev/steamcmd:source2-latest` |\n\nNote that Black Mesa: Deathmatch is built on the Counter-Strike: Global Offensive engine, which is a modified/updated version of Source 1. However, since the Source 2 image is based on the SteamRT `sniper` runtime, which was also used for CS:GO before CS 2 came along, the Black Mesa: Deathmatch game server container is now run via the Source 2 image. If you encounter any issues, please head over to the [project issues](https://github.com/thetredev/steamcmd/issues) and create a new issue to let me know.\n\n## Running multiple game servers\nIf you want to run multiple game servers using one single compose file, see the example file [`compose/srcds/multiple.yml`](compose/srcds/multiple.yml).\n\n## Kubernetes\nSee https://github.com/thetredev/helm-charts.\n\n## Image repositories\nThe main image repository is: `ghcr.io/thetredev/steamcmd`\u003cbr/\u003e\nSee https://github.com/thetredev/steamcmd/pkgs/container/steamcmd/versions for details.\n\nThe GitHub image repository is synchronized with the Docker Hub repository:\u003cbr/\u003e\nhttps://hub.docker.com/r/thetredev/steamcmd\n\nThe GitHub Actions workflows are setup in the following way:\n- Pushes to the `main` branch lead to the image tags `ghcr.io/thetredev/steamcmd:\u003cimage\u003e-latest`, where `\u003cimage\u003e` is one of the following: `base`, `hlds` or `srcds` (see *the supported game server images* above)\n- Pushes of tags lead to retagging the `ghcr.io/thetredev/steamcmd:\u003cimage\u003e-latest` images to `ghcr.io/thetredev/steamcmd:\u003cimage\u003e-\u003ctag\u003e`\n\nAll image builds used to be scanned for CVEs and only pushed as `latest` or the given tag if no CVEs are found. These scans have been removed and/or disabled since we're relying on official Steam Runtime images now (commit [a64d5003ac8d84eccc6326bc8270eef1105745e0](https://github.com/thetredev/steamcmd/tree/a64d5003ac8d84eccc6326bc8270eef1105745e0)) and we simply trust Valve to make the base images as secure as possible.\n\n## Known bugs\nSee the [project issues](https://github.com/thetredev/steamcmd/issues).\n\n## How to contribute?\nJust throw me a pull request - feel free to hack along!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthetredev%2Fsteamcmd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthetredev%2Fsteamcmd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthetredev%2Fsteamcmd/lists"}