{"id":22111683,"url":"https://github.com/phx/docktor","last_synced_at":"2025-04-10T03:21:57.380Z","repository":{"id":121578419,"uuid":"243079698","full_name":"phx/docktor","owner":"phx","description":"Host a Tor hidden service inside a Docker container without exposing any clearnet ports.","archived":false,"fork":false,"pushed_at":"2022-10-28T11:49:29.000Z","size":36,"stargazers_count":46,"open_issues_count":1,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T04:40:58.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/phx.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":"2020-02-25T19:06:46.000Z","updated_at":"2023-12-12T05:41:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"936678ab-a2f6-40fd-a1af-cdc17378f871","html_url":"https://github.com/phx/docktor","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/phx%2Fdocktor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phx%2Fdocktor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phx%2Fdocktor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phx%2Fdocktor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phx","download_url":"https://codeload.github.com/phx/docktor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248148704,"owners_count":21055638,"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":[],"created_at":"2024-12-01T10:50:32.831Z","updated_at":"2025-04-10T03:21:57.346Z","avatar_url":"https://github.com/phx.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Platform: ALL](https://img.shields.io/badge/platform-ALL-green)\n![Dependencies: python3+](https://img.shields.io/badge/dependencies-docker-blue)\n![Follow @rubynorails on Twitter](https://img.shields.io/twitter/follow/rubynorails?label=follow\u0026style=social)\n\n\n![brutalist](./docktor.png?raw=true)\n\n# Docktor\n\nDocktor allows you to host a darkweb hidden service by connecting to Tor only over the `docker0` interface.\nThe container proxies Tor traffic to its own localhost via `nginx` and serves up the content in the `hiddenservice` directory, via host/container volume mapping as the `nginx` document root.\n\nNo ports are mapped between the host and the container, but it wouldn't be a bad idea to lock down the `docker0` interface using `iptables` for good measure, but there are zero clearnet ports exposed in this setup.\n\n---\n\n## Install via GitHub\n\n- `git clone https://github.com/phx/docktor.git`\n- `cd docktor`\n- `docker build -t docktor.img .`\n- `docker run -d -v \"${PWD}/hiddenservice:/var/www/hiddenservice\" --name docktor docktor.img`\n\n## Install via DockerHub\n\n- `mkdir -p hiddenservice`\n- `touch hiddenservice/error.html`\n- `echo 'Welcome to the darkweb.' \u003e hiddenservice/index.html`\n- `docker run -d -v \"${PWD}/hiddenservice:/var/www/hiddenservice\" --name docktor lphxl/docktor:latest`\n\nYour `.onion` hostname will be listed in `./hiddenservice/hostname`, which you can access over Tor to view the content served in that directory.\n\n---\n\n### Notes\n\nAnytime you remove the container and start a new one using the `docker run` command, your `.onion` hostname will change.\n\nIf you want to keep serving content from the same Tor domain, keep the same container and just use the normal Docker commands:\n\n- `docker stop docktor`\n- `docker start docktor`\n- `docker exec -it docktor /bin/bash` (to exec into the container)\n\n---\n\nI will post additional instructions for running this after I push it to DockerHub and will also consider writing a `docker-compose` file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphx%2Fdocktor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphx%2Fdocktor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphx%2Fdocktor/lists"}