{"id":15575596,"url":"https://github.com/wiltonsr/opentracker-docker","last_synced_at":"2025-04-09T17:30:55.650Z","repository":{"id":137681872,"uuid":"456493367","full_name":"wiltonsr/opentracker-docker","owner":"wiltonsr","description":"Docker image from scratch, customizable, simple and small, for the opentracker project, an open and free BitTorrent tracker.","archived":false,"fork":false,"pushed_at":"2024-06-24T14:34:47.000Z","size":29,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-20T23:31:11.809Z","etag":null,"topics":["containers","docker","opentracker","torrent","tracker"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/wiltonsr/opentracker","language":"Dockerfile","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/wiltonsr.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-02-07T12:19:41.000Z","updated_at":"2024-12-12T00:57:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"14804bd9-0d1b-404e-bfff-7c93b68160b5","html_url":"https://github.com/wiltonsr/opentracker-docker","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/wiltonsr%2Fopentracker-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiltonsr%2Fopentracker-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiltonsr%2Fopentracker-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiltonsr%2Fopentracker-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiltonsr","download_url":"https://codeload.github.com/wiltonsr/opentracker-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231896022,"owners_count":18442406,"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":["containers","docker","opentracker","torrent","tracker"],"created_at":"2024-10-02T18:39:17.816Z","updated_at":"2025-04-09T17:30:55.595Z","avatar_url":"https://github.com/wiltonsr.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opentracker-docker\n\nDocker image from scratch, customizable, simple and small, for the [opentracker project](https://erdgeist.org/arts/software/opentracker/), an open and free BitTorrent tracker.\n\n## Updates\n\n- The `opentracker`'s updates can be found [here](https://erdgeist.org/gitweb/opentracker/).\n- The `opentracker-docker`'s updates can be found [here](https://github.com/wiltonsr/opentracker-docker).\n\n## How to use this image\n\nThis image compile `Opentracker` following [build instructions](https://erdgeist.org/arts/software/opentracker/#build-instructions), but using [GCC](https://gcc.gnu.org/)'s [`-static`](https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html) link option. The `-static` option links a program statically, in other words it does not require a dependency on dynamic libraries at runtime in order to run.\n\nThis image is designed to be used in a micro-service environment. There are three versions of the image you can choose from.\n\nThe `open` tag contains a Opentracker builded with defaults options and run in [open mode](https://erdgeist.org/arts/software/opentracker/#invocation).\n\nThe `blacklist` and `whitelist` tags contains a Opentracker builded with `-DWANT_ACCESSLIST_BLACK` and `-DWANT_ACCESSLIST_WHITE` respectively and run in [closed mode](https://erdgeist.org/arts/software/opentracker/#closed-mode).\n\n## Using in `open` Mode\n\nThe image has `/tini -- /bin/opentracker` binary as [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint) and `-f /etc/opentracker/opentracker.conf` as default [CMD](https://docs.docker.com/engine/reference/builder/#exec-form-entrypoint-example).\n\nWe use [tini](https://github.com/krallin/tini), a tiny but valid init for containers, to manage `PID 1` and correctly handle signals to `opentracker`.\n\nSo you can run:\n\n```bash\ndocker run \\\n  --rm \\\n  -d \\\n  --name opentracker \\\n  -p 6969:6969/udp -p 6969:6969 \\\n  wiltonsr/opentracker:open\n```\n\nOr with `docker-compose.yml` file:\n\n```yml\nversion: \"3\"\n\nservices:\n  tracker:\n    image: wiltonsr/opentracker:open\n    container_name: opentracker\n    restart: always\n    ports:\n      - 6969:6969/tcp\n      - 6969:6969/udp\n```\n\n```bash\ndocker-compose up\n```\n\nNow you can access [Opentracker Stats page](https://erdgeist.org/arts/software/opentracker/#statistics) at http://localhost:6969/stats from your host system.\n\n### Debug Mode\n\nAll `tags` also contains `/bin/opentracker.debug` binary. So you could run Opentracker in `debug mode` overriding default `ENTRYPOINT` and `CMD`.\n\n```bash\ndocker run \\\n  --rm \\\n  -d \\\n  --name opentracker \\\n  -p 6969:6969/udp -p 6969:6969 \\\n  --entrypoint=\"/tini\" \\\n  wiltonsr/opentracker:open \\\n  -- /bin/opentracker.debug -f /etc/opentracker/opentracker.conf\n```\n\nIt is also possible to override the default command with:\n\n```bash\ndocker run \\\n  --rm \\\n  --name opentracker \\\n  -p 6969:6969/udp -p 6969:6969 \\\n  wiltonsr/opentracker:open \\\n  -h\n```\n\nYou will get:\n\n```text\nUsage: /bin/opentracker [-i ip] [-p port] [-P port] [-r redirect] [-d dir] [-u user] [-A ip] [-f config] [-s livesyncport]\n        -f config include and execute the config file\n        -i ip     specify ip to bind to (default: *, you may specify more than one)\n        -p port   specify tcp port to bind to (default: 6969, you may specify more than one)\n        -P port   specify udp port to bind to (default: 6969, you may specify more than one)\n        -r redirecturlspecify url where / should be redirected to (default none)\n        -d dir    specify directory to try to chroot to (default: \".\")\n        -u user   specify user under whose privileges opentracker should run (default: \"nobody\")\n        -A ip     bless an ip address as admin address (e.g. to allow syncs from this address)\n\nExample:   ./opentracker -i 127.0.0.1 -p 6969 -P 6969 -f ./opentracker.conf -i 10.1.1.23 -p 2710 -p 80\n```\n\n### Configuration file\n\nAll `tags` use default configuration file from [here](https://erdgeist.org/gitweb/opentracker/tree/opentracker.conf.sample).\n\nSome adjusts are made:\n\n- `tracker.user` is setted to `farmhand` [USER](https://docs.docker.com/engine/reference/builder/#user) in all tags.\n- `access.whitelist` is setted to `/etc/opentracker/whitelist` in `whitelist` tag.\n- `access.blacklist` is setted to `/etc/opentracker/blacklist` in `blacklist` tag.\n\nYou could override the default configuration using a [VOLUME](https://docs.docker.com/engine/reference/builder/#volume):\n\n```bash\ndocker run \\\n  --rm \\\n  --name opentracker \\\n  -v $PWD/local-opentracker.conf:/etc/opentracker/opentracker.conf \\\n  -p 6969:6969/udp -p 6969:6969 \\\n  wiltonsr/opentracker:open\n```\n\n## Using in `closed` Mode\n\nIf you want to control what torrents to track – or not to track. You could use opentracker with one of the accesslist-options `tags`, you can control which torrents are tracked by providing a file that contains a list of human readable `info_hashes`. An example whitelist file would look like\n\n```text\n0123456789abcdef0123456789abcdef01234567\n890123456789abcdef0123456789abcdef012345\n```\n\n### Compilation\n\nOpentracker provides accesslist options, `-DWANT_ACCESSLIST_BLACK` and `-DWANT_ACCESSLIST_WHITE`, but this options are `exclusive`. Trying to compile it with both options will resulte in this error:\n\n```bash\ncc -c -o opentracker.o -I../libowfat -Wall -pipe -Wextra  -O3 -DWANT_ACCESSLIST_BLACK -DWANT_ACCESSLIST_WHITE -DWANT_FULLSCRAPE opentracker.c\nIn file included from opentracker.c:36:\not_accesslist.h:10:4: error: #error WANT_ACCESSLIST_BLACK and WANT_ACCESSLIST_WHITE are exclusive.\n   10 | #  error WANT_ACCESSLIST_BLACK and WANT_ACCESSLIST_WHITE are exclusive.\n      |    ^~~~~\nmake: *** [Makefile:81: opentracker.o] Erro 1\n```\n\nBecause of that there are two another tags, `blacklist` and `whitelist`, which were compiled with the respective options.\n\n### Whitelist Mode\n\n```bash\ntouch local-whitelist\nchmod -v 0666 local-whitelist\n\ndocker run \\\n  --rm \\\n  --name opentracker \\\n  -v $PWD/local-whitelist:/etc/opentracker/whitelist \\\n  -p 6969:6969/udp -p 6969:6969 \\\n  wiltonsr/opentracker:whitelist\n```\n\n### Blacklist Mode\n\n```bash\ntouch local-blacklist\nchmod -v 0666 local-blacklist\n\ndocker run \\\n  --rm \\\n  --name opentracker \\\n  -v $PWD/local-blacklist:/etc/opentracker/blacklist \\\n  -p 6969:6969/udp -p 6969:6969 \\\n  wiltonsr/opentracker:blacklist\n```\n\n### Reloading file changes\n\nTo make opentracker reload it's `white`/`blacklist` after changes, send a `SIGHUP` unix signal.\n\n```bash\ndocker kill --signal=\"SIGHUP\" opentracker\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiltonsr%2Fopentracker-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiltonsr%2Fopentracker-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiltonsr%2Fopentracker-docker/lists"}