{"id":15646046,"url":"https://github.com/qdm12/cod4-docker","last_synced_at":"2026-03-07T15:32:18.225Z","repository":{"id":40691681,"uuid":"120357936","full_name":"qdm12/cod4-docker","owner":"qdm12","description":"Runs a Call of duty 4 Modern Warfare (cod4x) dedicated server in a Docker container.","archived":false,"fork":false,"pushed_at":"2023-02-25T09:18:53.000Z","size":1713,"stargazers_count":59,"open_issues_count":6,"forks_count":10,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-30T12:01:42.895Z","etag":null,"topics":["cod4-game","cod4x-server","custom-mods","dedicated-server","docker","docker-cod4","scratch"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/qmcgaw/cod4","language":"Go","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/qdm12.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["qdm12"]}},"created_at":"2018-02-05T20:30:53.000Z","updated_at":"2025-02-14T04:25:28.000Z","dependencies_parsed_at":"2024-06-18T23:59:24.618Z","dependency_job_id":"f602e193-d56d-4e64-bdbb-cd430be846a6","html_url":"https://github.com/qdm12/cod4-docker","commit_stats":{"total_commits":121,"total_committers":1,"mean_commits":121.0,"dds":0.0,"last_synced_commit":"3ad8de8a15aacb344ab9431f8684a57635f76892"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/qdm12/cod4-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdm12%2Fcod4-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdm12%2Fcod4-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdm12%2Fcod4-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdm12%2Fcod4-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qdm12","download_url":"https://codeload.github.com/qdm12/cod4-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qdm12%2Fcod4-docker/sbom","scorecard":{"id":753027,"data":{"date":"2025-08-11","repo":{"name":"github.com/qdm12/cod4-docker","commit":"3ad8de8a15aacb344ab9431f8684a57635f76892"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/dockerhub-description.yml:1","Warn: no topLevel permission defined: .github/workflows/labels.yml:1","Warn: no topLevel permission defined: .github/workflows/latest.yml:1","Warn: no topLevel permission defined: .github/workflows/misspell.yml:1","Warn: no topLevel permission defined: .github/workflows/pr.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dockerhub-description.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/qdm12/cod4-docker/dockerhub-description.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dockerhub-description.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/qdm12/cod4-docker/dockerhub-description.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/labels.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/qdm12/cod4-docker/labels.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/labels.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/qdm12/cod4-docker/labels.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/latest.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/qdm12/cod4-docker/latest.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/latest.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/qdm12/cod4-docker/latest.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/misspell.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/qdm12/cod4-docker/misspell.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/misspell.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/qdm12/cod4-docker/misspell.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pr.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/qdm12/cod4-docker/pr.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/qdm12/cod4-docker/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/qdm12/cod4-docker/release.yml/master?enable=pin","Warn: containerImage not pinned by hash: .devcontainer/Dockerfile:1: pin your Docker image by updating qmcgaw/godevcontainer to qmcgaw/godevcontainer@sha256:ba617bcafac6b46e08684fb4919765e5bef12996691229bdccad3ddfd78e8569","Warn: containerImage not pinned by hash: Dockerfile:8","Warn: containerImage not pinned by hash: Dockerfile:9","Warn: containerImage not pinned by hash: Dockerfile:11","Warn: containerImage not pinned by hash: Dockerfile:36","Warn: containerImage not pinned by hash: Dockerfile:47","Warn: containerImage not pinned by hash: Dockerfile:65","Warn: containerImage not pinned by hash: Dockerfile:85","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of   8 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T20:51:10.234Z","repository_id":40691681,"created_at":"2025-08-22T20:51:10.234Z","updated_at":"2025-08-22T20:51:10.234Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30219541,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T14:02:48.375Z","status":"ssl_error","status_checked_at":"2026-03-07T14:02:43.192Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cod4-game","cod4x-server","custom-mods","dedicated-server","docker","docker-cod4","scratch"],"created_at":"2024-10-03T12:11:08.945Z","updated_at":"2026-03-07T15:32:18.186Z","avatar_url":"https://github.com/qdm12.png","language":"Go","readme":"# COD4 Docker dedicated server\n\nCall of duty 4 dedicated server in a 125MB Docker image.\n\n[![Docker Cod4](https://github.com/qdm12/cod4-docker/raw/master/images/title.png)](https://hub.docker.com/r/qmcgaw/cod4/)\n\n[![Build status](https://github.com/qdm12/cod4-docker/workflows/Buildx%20latest/badge.svg)](https://github.com/qdm12/cod4-docker/actions?query=workflow%3A%22Buildx+latest%22)\n[![Docker Pulls](https://img.shields.io/docker/pulls/qmcgaw/cod4.svg)](https://hub.docker.com/r/qmcgaw/cod4)\n[![Docker Stars](https://img.shields.io/docker/stars/qmcgaw/cod4.svg)](https://hub.docker.com/r/qmcgaw/cod4)\n\n[![GitHub last commit](https://img.shields.io/github/last-commit/qdm12/cod4-docker.svg)](https://github.com/qdm12/cod4-docker/issues)\n[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/qdm12/cod4-docker.svg)](https://github.com/qdm12/cod4-docker/issues)\n[![GitHub issues](https://img.shields.io/github/issues/qdm12/cod4-docker.svg)](https://github.com/qdm12/cod4-docker/issues)\n\n[![Join Slack channel](https://img.shields.io/badge/slack-@qdm12-yellow.svg?logo=slack)](https://join.slack.com/t/qdm12/shared_invite/enQtOTE0NjcxNTM1ODc5LTYyZmVlOTM3MGI4ZWU0YmJkMjUxNmQ4ODQ2OTAwYzMxMTlhY2Q1MWQyOWUyNjc2ODliNjFjMDUxNWNmNzk5MDk)\n\n[![Donate PayPal](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/qmcgaw)\n\n## Requirements\n\n- COD4 Client game\n- COD4 running on version 1.7 have to [update to 1.8-20.1](#update-your-game)\n- Original COD4 **main** and **zone** files required (from the client installation directory)\n\n## Features\n\n- [Cod4x server features](https://github.com/callofduty4x/CoD4x_Server#the-most-prominent-features-are)\n- Works with custom mods and maps (see the [Mods section](#Mods))\n- Built-in HTTP file server for usermaps and mods (only works with .ff and .iwd files for security reasons)\n- Runs without root (safer)\n- Default cod4 configuration file [server.cfg](https://github.com/qdm12/cod4-docker/blob/master/server.cfg) when not using mods, with `exec server.cfg`\n- Works with the cod4x masterlist\n- [Cod4x](https://github.com/callofduty4x/CoD4x_Server) server built from source\n- Other Cod4x files server downloaded from [cod4x.me](https://cod4x.me)\n- Auto updates to the latest cod4x release\n- Only 125MB\n- See more Docker image tags: [Docker Hub tags](https://hub.docker.com/repository/docker/qmcgaw/cod4/tags)\n\n## Setup\n\nWe assume your *call of duty 4 game* is installed at `/mycod4path`\n\n1. On your host, create the directories `./main`, `./zone`, `./mods` and `./usermaps`.\n1. From your Call of Duty 4 installation directory:\n    - Copy all the `.iwd` files from `/mycod4path/main` to `./main`\n    - Copy all the files from `/mycod4path/zone` to `./zone`\n    - (Optional) Copy the mods you want to use from `/mycod4path/mods` to `./mods`\n    - (Optional) Copy the maps you want to use from `/mycod4path/usermaps` to `./usermaps`\n1. As the container runs as user ID 1000 by default, fix the ownership and permissions:\n\n    ```bash\n    chown -R 1000 main mods usermaps zone\n    chmod -R 700 main mods usermaps zone\n    ```\n\n    You can also run the container with `--user=\"root\"` (unadvised!) if this doesn't work, or build the image with `--build-arg UID=yourid`.\n\n1. Run the following command as root user on your host:\n\n    ```bash\n    docker run -d --name=cod4 -p 28960:28960/tcp -p 28960:28960/udp -p 8000:8000/tcp \\\n        -v /mycod4path/main:/home/user/cod4/main \\\n        -v /mycod4path/zone:/home/user/cod4/zone \\\n        -v /mycod4path/mods:/home/user/cod4/mods \\\n        -v /mycod4path/usermaps:/home/user/cod4/usermaps:ro \\\n        qmcgaw/cod4 +map mp_shipment\n    ```\n\n    The command line argument `+map mp_shipment` is optional and defaults to `+set dedicated 2+set sv_cheats \"1\"+set sv_maxclients \"64\"+exec server.cfg+map_rotate`\n\n    You can also download and modify the [*docker-compose.yml*](https://raw.githubusercontent.com/qdm12/cod4-docker/master/docker-compose.yml) file and run\n\n    ```bash\n    docker-compose up -d\n    ```\n\n### HTTP server for custom mods and maps\n\nBy default, the container runs with an HTTP file server for mods and usermaps on port `8000`.\n\n- You can disable it with `-e HTTP_SERVER=off`\n- You can change its published port with for example `-p 9000:8000/tcp`\n- You can change its root URL with for example `-e ROOT_URL=/cod4`. This is useful if you use a reverse proxy.\n\n1. Locate the relevant cod4 configuration file - for example `main/server.cfg` or `mods/mymod/server.cfg`\n1. Modify/add the following lines \u0026 change `youraddress` to your IP or domain name:\n\n    ```c\n    set sv_allowdownload \"1\"\n    set sv_wwwDownload \"1\"\n    set sv_wwwBaseURL \"http://youraddress:8000\" // supports http, https and ftp addresses\n    set sv_wwwDlDisconnected \"0\"\n    ```\n\n1. Feel free to open an issue for help setting this up, such as port forwarding or reverse proxy setup help\n\n## Update your game\n\n1. Make sure you updated your game to version 1.7 first (see [this](https://cod4x.me/index.php?/forums/topic/12-how-to-install-cod4x/))\n1. Download the [COD4x client ZIP file](https://cod4x.me/downloads/cod4x_client_20_1.zip)\n1. Using Winrar / 7Zip / Winzip, extract **cod4x_client_20_1.zip** to your COD4 game directory\n1. Go in the extracted directory *cod4-client-manualinstall_20.1* and double click on **install.cmd**\n1. When launching the multiplayer game, you should see at the bottom right `20.1`\n\n## Testing\n\n1. Make sure you [updated your COD4 Game to 1.8-19.0](#update-your-game)\n1. Launch the COD4 multiplayer game\n1. Click on **Join Game**\n1. Click on **Source** at the top until it's set on *Favourites*\n1. Click on **New Favourite** on the top right\n1. Enter your host LAN IP Address (i.e. `192.168.1.26`)\n    - Add the port if you run it on something else than port UDP 28960 (i.e. `192.168.1.26:28961`)\n1. Click on **Refresh** and try to connect to the server in the list\n\n![COD4 screenshot](https://github.com/qdm12/cod4-docker/blob/master/images/test.png?raw=true)\n\n## Mods\n\nAssuming:\n\n- Your mod directory is `./mymod`\n- Your main mod configuration file is `./mymod/server.cfg`\n\nSet the command line option to `+set dedicated 2+set sv_cheats \"1\"+set sv_maxclients \"64\"+set fs_game mods/mymod+exec server.cfg +map_rotate`\n\n## Write protected args\n\nThe following parameters are write protected and **can't be placed in the server configuration file**,\nand must be in the command passed to the container:\n\n- `+set dedicated 2` - 2: open to internet, 1: LAN, 0: localhost\n- `+set sv_cheats \"1\"` - 1 to allow cheats, 0 otherwise\n- `+set sv_maxclients \"64\"` - number of maximum clients\n- `+exec server.cfg` if using a configuration file\n- `+set fs_game mods/mymod` if using a custom mod\n- `+set com_hunkMegs \"512\"` don't use if not needed\n- `+set net_ip 127.0.0.1` don't use if not needed\n- `+set net_port 28961` don't use if not needed\n- `+map_rotate` OR i.e. `+map mp_shipment` **should be the last launch argument**\n\nBy default, the Docker image uses [this command](https://github.com/qdm12/cod4-docker/blob/master/Dockerfile#L68).\n\n## TODOs\n\n- UDP proxy for Windows\n- Reload ability of cod4x\n- Docker Healthcheck + HTTP healthcheck endpoint (i.e. for K8s)\n- Add extra ping with udp proxy\n- More env variables\n  - Plugins\n- [Plugins](https://hub.docker.com/r/callofduty4x/cod4x18-server/)\n- Built-in mods?\n\n## Acknowledgements\n\n- Credits to the developers of Cod4x server\n- The help I had on [Cod4x.me forums](https://cod4x.me/index.php?/forums/)\n","funding_links":["https://github.com/sponsors/qdm12","https://paypal.me/qmcgaw"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqdm12%2Fcod4-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqdm12%2Fcod4-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqdm12%2Fcod4-docker/lists"}