{"id":15748047,"url":"https://github.com/jakejarvis/docker-tor","last_synced_at":"2025-04-30T08:21:34.228Z","repository":{"id":146831563,"uuid":"583386167","full_name":"jakejarvis/docker-tor","owner":"jakejarvis","description":"🧅 A very simple Docker image that runs the Tor daemon","archived":false,"fork":false,"pushed_at":"2024-01-11T17:15:34.000Z","size":10,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-20T09:59:49.268Z","etag":null,"topics":["docker","onion","proxy","tor","tor-service"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/jakejarvis/tor","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/jakejarvis.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-12-29T16:14:28.000Z","updated_at":"2025-02-22T17:46:57.000Z","dependencies_parsed_at":"2024-01-11T21:14:11.220Z","dependency_job_id":"f1f224d3-b456-49e9-bd08-7f0e1385a445","html_url":"https://github.com/jakejarvis/docker-tor","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/jakejarvis%2Fdocker-tor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakejarvis%2Fdocker-tor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakejarvis%2Fdocker-tor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakejarvis%2Fdocker-tor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakejarvis","download_url":"https://codeload.github.com/jakejarvis/docker-tor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666680,"owners_count":21624351,"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","onion","proxy","tor","tor-service"],"created_at":"2024-10-04T05:40:27.988Z","updated_at":"2025-04-30T08:21:34.205Z","avatar_url":"https://github.com/jakejarvis.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧅 docker-tor\n\nA _very_ simple Docker image that runs the Tor daemon.\n\n\u003e ⚠️ This image is designed for running hidden services, **not** for using Tor on your desktop via a SOCKS proxy, etc. You can still do this — there's nothing special about the Tor binary here — but there are plenty of [other Docker images](https://hub.docker.com/r/peterdavehello/tor-socks-proxy/) better suited for this use case!\n\n## Usage\n\n### CLI\n\n```bash\n# create a volume to persist Tor data between container restarts\ndocker volume create tor-data\n\n# start a Tor container\ndocker run --rm \\\n  --name tor \\\n  --volume tor-data:/var/lib/tor/ \\\n  --volume ~/my-tor-stuff/torrc:/etc/tor/torrc:ro \\\n  jakejarvis/tor:latest\n\n# optional: copy existing keys and hostname to volume (restart Tor container afterwards)\ndocker cp ~/my-tor-stuff/keys/. tor:/var/lib/tor/hidden_service/\n```\n\n### `docker-compose.yml`\n\nExample of Tor in front of an nginx web server to run a hidden service:\n\n```yml\nversion: \"3.9\"\n\nservices:\n  tor:\n    image: jakejarvis/tor:latest\n    restart: unless-stopped\n    volumes:\n      - tor-data:/var/lib/tor/\n      - ./torrc:/etc/tor/torrc:ro\n    depends_on:\n      - web\n\n  web:\n    image: ubuntu/nginx:latest\n    restart: unless-stopped\n    volumes:\n      - ./my_website:/var/www/html\n      - ./nginx.conf:/etc/nginx/nginx.conf\n\nvolumes:\n  tor-data:\n```\n\n### Starting a new hidden service\n\nIf you don't copy/mount existing keys and a hostname to `/var/lib/tor/hidden_service/` (highly recommended, see next section!) Tor will automatically generate them along with a random `.onion` domain. To see this domain, run:\n\n```sh\ndocker exec \u003ccontainer id\u003e cat /var/lib/tor/hidden_service/hostname\n```\n\nYou should be able to visit this `.onion` address immediately in the [Tor Browser](https://www.torproject.org/download/)!\n\n### Using existing Tor config/keys\n\nSimply mounting an existing `torrc` configuration and a folder of public/private keys to the container will tell it exactly how to behave on next start.\n\n```sh\ndocker cp ~/my-tor-stuff/keys/. \u003ccontainer id\u003e:/var/lib/tor/hidden_service/\n```\n\nA default `/etc/tor/torrc` file (see [`torrc.default`](torrc.default)) is already in the image, with a hidden service (whose keys are in `/var/lib/tor/hidden_service`) pointing to a container/server named `web` on port 80 (`http://web:80`).\n\nTo override any of this, create your own `torrc` file and mount it to `/etc/tor/torrc` (see above).\n\n## Examples\n\n- [jarvis2i2vp4j4tbxjogsnqdemnte5xhzyi7hziiyzxwge3hzmh57zad.onion](http://jarvis2i2vp4j4tbxjogsnqdemnte5xhzyi7hziiyzxwge3hzmh57zad.onion): A mirror of my clearnet website at [jarv.is](https://jarv.is/)\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakejarvis%2Fdocker-tor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakejarvis%2Fdocker-tor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakejarvis%2Fdocker-tor/lists"}