{"id":13584017,"url":"https://github.com/fphammerle/docker-onion-service","last_synced_at":"2025-05-04T04:32:24.572Z","repository":{"id":39712582,"uuid":"163227750","full_name":"fphammerle/docker-onion-service","owner":"fphammerle","description":"hidden tor .onion service 🐳","archived":false,"fork":false,"pushed_at":"2025-04-25T17:29:26.000Z","size":297,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-01T06:03:18.504Z","etag":null,"topics":["docker","network","onion-service","podman","security","tor"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/fphammerle/onion-service","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fphammerle.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2018-12-27T00:12:30.000Z","updated_at":"2025-04-25T17:29:30.000Z","dependencies_parsed_at":"2023-02-12T04:01:21.461Z","dependency_job_id":"acc3b0c7-d52e-4fcf-a083-78818750d6dc","html_url":"https://github.com/fphammerle/docker-onion-service","commit_stats":null,"previous_names":[],"tags_count":68,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fphammerle%2Fdocker-onion-service","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fphammerle%2Fdocker-onion-service/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fphammerle%2Fdocker-onion-service/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fphammerle%2Fdocker-onion-service/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fphammerle","download_url":"https://codeload.github.com/fphammerle/docker-onion-service/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252288911,"owners_count":21724323,"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":["docker","network","onion-service","podman","security","tor"],"created_at":"2024-08-01T15:03:57.723Z","updated_at":"2025-05-04T04:32:19.556Z","avatar_url":"https://github.com/fphammerle.png","language":"Makefile","funding_links":[],"categories":["Makefile"],"sub_categories":[],"readme":"# docker: hidden tor .onion service 🐳\n\nrepo: https://github.com/fphammerle/docker-onion-service\n\ndocker hub: https://hub.docker.com/r/fphammerle/onion-service/tags\n\nsigned tags: https://github.com/fphammerle/docker-onion-service/tags\n\ndefaults to creating a [v3](https://trac.torproject.org/projects/tor/wiki/doc/NextGenOnions) service\n\n## example 1\n\n```sh\n$ sudo docker run --name onion_service \\\n    -e VIRTUAL_PORT=80 -e TARGET=1.2.3.4:8080 \\\n    fphammerle/onion-service\n```\n\n## example 2\n\n```sh\n$ sudo docker create --name onion_service \\\n    --env VERSION=3 \\\n    --env VIRTUAL_PORT=80 \\\n    --env TARGET=1.2.3.4:8080 \\\n    --volume onion-key:/onion-service \\\n    --restart unless-stopped \\\n    --cap-drop all --security-opt no-new-privileges \\\n    fphammerle/onion-service:latest\n\n$ sudo docker start onion_service\n```\n\noptionally add `--read-only --tmpfs /tmp:rw,size=4k`\nto make the container's root filesystem read only\n\n## retrieve hostname\n\n```sh\n$ sudo docker exec onion_service cat /onion-service/hostname\nabcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrst.onion\n```\n\n## single-hop mode\n\nin single-hop mode connections from the onion service\nto introduction \u0026 rendezvous points will be direct\nand thus no longer anonymous:\n```sh\n$ sudo docker run -e NON_ANONYMOUS_SINGLE_HOP_MODE=1 …\n```\n\nuseful to reduce latency (e.g. clearnet http servers setting `alt-svc` header)\n\n## show circuits\n\n```sh\n$ sudo docker exec onion_service \\\n    sh -c 'printf \"AUTHENTICATE\\nGETINFO circuit-status\\nQUIT\\n\" | nc localhost 9051'\n```\nrelay search: https://metrics.torproject.org/rs.html\n\n## docker-compose 🐙\n\n1. `git clone https://github.com/fphammerle/docker-onion-service`\n2. edit `docker-compose.yml`\n3. `sudo docker-compose up --build`\n\n## further reading\n\n[onion service protocol overview](https://community.torproject.org/onion-services/overview/)\n\n[operational security](https://community.torproject.org/onion-services/advanced/opsec/)\n\n### http\n\nways to publish onion services:\n* alt-svc header:\n  [cloudflare blog](https://blog.cloudflare.com/cloudflare-onion-service/),\n  [privacytools.io](https://web.archive.org/web/20210116140200/https://write.privacytools.io/jonah/securing-services-with-tor-and-alt-svc),\n  [comparison](https://medium.com/@alecmuffett/different-ways-to-add-tor-onion-addresses-to-your-website-39106e2506f9),\n  [syntax](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Alt-Svc),\n  [spec](https://tools.ietf.org/html/rfc7838)\n* onion-location header:\n  [apache \u0026 nginx setup](https://community.torproject.org/onion-services/advanced/onion-location/),\n  [announcement for android](https://blog.torproject.org/comment/288078)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffphammerle%2Fdocker-onion-service","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffphammerle%2Fdocker-onion-service","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffphammerle%2Fdocker-onion-service/lists"}