{"id":42569716,"url":"https://github.com/svengo/docker-tor","last_synced_at":"2026-05-16T10:04:23.253Z","repository":{"id":24767216,"uuid":"102398369","full_name":"svengo/docker-tor","owner":"svengo","description":"Simple Docker container to run a Tor node.","archived":false,"fork":false,"pushed_at":"2026-05-09T14:49:06.000Z","size":526,"stargazers_count":15,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-09T14:51:12.909Z","etag":null,"topics":["anonymity","docker","dockerfile","node","tor","tor-node","tor-server"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/svengo/tor","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/svengo.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-09-04T20:10:06.000Z","updated_at":"2026-05-08T14:26:58.000Z","dependencies_parsed_at":"2023-09-26T00:19:31.601Z","dependency_job_id":"7074f319-5ff1-495f-a637-5ed0572e507d","html_url":"https://github.com/svengo/docker-tor","commit_stats":null,"previous_names":[],"tags_count":124,"template":false,"template_full_name":null,"purl":"pkg:github/svengo/docker-tor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svengo%2Fdocker-tor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svengo%2Fdocker-tor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svengo%2Fdocker-tor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svengo%2Fdocker-tor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svengo","download_url":"https://codeload.github.com/svengo/docker-tor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svengo%2Fdocker-tor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33098340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["anonymity","docker","dockerfile","node","tor","tor-node","tor-server"],"created_at":"2026-01-28T21:05:19.096Z","updated_at":"2026-05-16T10:04:23.247Z","avatar_url":"https://github.com/svengo.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-tor\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/512b3288012c4c10b50ea7112eaa3deb)](https://app.codacy.com/gh/svengo/docker-tor/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\n[![Build and publish a Docker image](https://github.com/svengo/docker-tor/actions/workflows/publish-docker.yml/badge.svg)](https://github.com/svengo/docker-tor/actions/workflows/publish-docker.yml)\n![GitHub publish (with filter)](https://img.shields.io/github/v/release/svengo/docker-tor)\n![GitHub repo stars](https://img.shields.io/github/stars/svengo/docker-tor?label=repo%20stars)\n[![GitHub licence](https://img.shields.io/github/license/svengo/docker-tor.svg)](https://github.com/svengo/docker-tor/blob/master/LICENSE)\n![Docker Image Size (tag)](https://img.shields.io/docker/image-size/svengo/tor/latest)\n[![Docker Stars](https://img.shields.io/docker/stars/svengo/tor)](https://hub.docker.com/r/svengo/tor)\n[![Docker Pulls](https://img.shields.io/docker/pulls/svengo/tor)](https://hub.docker.com/r/svengo/tor)\n\nSimple Docker container to run a Tor node.\n\n## Quick reference\n\n- **Maintained by**:  \n  [Sven Gottwald](https://github.com/svengo/)\n\n- **Where to get help**:  \n  [svengo/docker-tor issues](https://github.com/svengo/docker-tor/issues)\n\n- **Docker Hub**:  \n  [svengo/tor](https://hub.docker.com/r/svengo/tor)\n\n- **GitHub Container registry**:  \n  [svengo/docker-tor](https://github.com/svengo/docker-tor/pkgs/container/tor)\n\n- **Tor project**:  \n  [Tor Project](https://www.torproject.org/)\n\n## Supported tags and corresponding `Dockerfile` links\n\n- [`latest`, `0.4.9.8`](https://github.com/svengo/docker-tor/blob/8b2549d51f0aa1f81cf9a5c020ac6fdfbad5135a/Dockerfile)\n\nThe Docker images are tagged with the full Tor version number. Other versions are not supported.\nI will regularly rebuild the image to include updated Alpine packages with security fixes.\n\n## How to use this image\n\n### Start a simple Tor node\n\nThis command will start a Tor node and open ports 9001 and 9030:\n\n``` console\ndocker run -d -p 9001:9001 -p 9030:9030 --name tor svengo/tor\n```\n\n### Docker Compose\n\nIt is recommended to use `docker compose` for running the container. Use the supplied [docker-compose.yml](https://github.com/svengo/docker-tor/raw/refs/heads/main/docker-compose.yml) and copy [docker-compose.env.dist](https://github.com/svengo/docker-tor/raw/refs/heads/main/docker-compose.env.dist) to `docker-compose.env`. You can edit `docker-compose.env` to your needs.\n\n### Data storage\n\nData is stored in an anonymous volume that is mounted on ``/data`` (see docker inspect for more information). You can use a host volume to store the data in a specific directory on the host. Make sure that the ``tor:tor`` user (default uid 100 / gid 101) has r/w permissions.\n\nStart the container:\n\n``` console\ndocker run -d -p 9001:9001 -p 9030:9030 --name tor -v /data/tor:/data svengo/tor\n```\n\n### Basic configuration\n\nUse environment variables for basic configuration. The contents of the environment variables are used to build `/etc/tor/torrc-defaults`, for more advanced configuration you can edit the `/data/torrc` configuration file directly.\n\n``` console\ndocker run -d -p 9001:9001 -p 9030:9030 --name tor -v /data/tor:/data -e \"NICKNAME=MyDockerTorNode\" -e \"CONTACTINFO=foo@example.com\" svengo/tor\n```\n\n#### Environment Variables\n\nsvengo/tor uses several environment variables to generate the ``torrc-defaults``-file, the variables are set to reasonable defaults (see below). You can edit ``/data/torrc`` to your needs after the first run.\n\n##### ORPORT\n\n`ORPORT=[address:]PORT [flags]`\n\nAdvertise this port to listen for connections from Tor clients and servers. This option is required to be a Tor server.\n\n(Default: ``9001``)\n\n##### DIRPORT\n\n`DIRPORT=[address:]PORT [flags]`\n\nIf this option is nonzero, advertise the directory service on this port.\n\n(Default: ``9030``)\n\n##### EXITPOLICY\n\n`EXITPOLICY=policy,policy,…`\n\nSet an exit policy for this server. Each policy is of the form `accept[6]|reject[6] ADDR[/MASK][:PORT]`. If `/MASK` is omitted, then this policy just applies to the host given. Instead of giving a host or network you can also use `*` to denote the universe (0.0.0.0/0 and ::/128), or `*4` to denote all IPv4 addresses, and `*6` to denote all IPv6 addresses. `PORT` can be a single port number, an interval of ports `FROM_PORT-TO_PORT`, or `*` . If PORT is omitted, that means `*`.\n\n(Default: ``reject *:* # no exits allowed``)\n\n##### CONTROLPORT (optional)\n\n`CONTROLPORT=PORT|unix:path|auto [flags]`\n\nIf set, Tor will accept connections on this port and allow those connections to control the Tor process using the Tor Control Prot\nocol (described in control-spec.txt in torspec). Note: unless you also specify HASHEDCONTROLPASSWORD, setting this option will cau\nse Tor to allow any process on the local host to control it. If you use `docker compose`, you must also uncomment the corresponding port mapping in `docker-compose.yml` to make it reachable from the host.\n\n(Default: *empty*)\n\n##### HASHEDCONTROLPASSWORD (optional)\n\n`HASHEDCONTROLPASSWORD=16:ACDB834CF7DA60F360D2C932BA2B12E545EE7C4BC4BA33AC492B8E3C12`\n\nAllow connections on the control port if they present the password whose one-way hash is hashed_password. You can compute the hash of a password by running ``docker run -it --rm svengo/tor:latest tor --hash-password \"your_password\"``\n\n(Default: *empty*)\n\n##### NICKNAME\n\n`NICKNAME=name`\n\nSet the server’s nickname to 'name'. Nicknames must be between 1 and 19 characters inclusive, and must contain only the characters ``[a-zA-Z0-9]``.\n\n(Default: ``ididnteditheconfig``)\n\n##### CONTACTINFO\n\n`CONTACTINFO=email_address`\n\nAdministrative contact information for this relay or bridge. This line can be used to contact you if your relay or bridge is misconfigured or something else goes wrong. Note that we archive and publish all descriptors containing these lines and that Google indexes them, so spammers might also collect them. You may want to obscure the fact that it’s an email address and/or generate a new address for this purpose.\n\nYou can use [Tor ContactInfo Generator](https://torcontactinfogenerator.netlify.app/) to create a contact info following [ContactInfo-Information-Sharing-Specification](https://nusenu.github.io/ContactInfo-Information-Sharing-Specification/).\n\n(Default: ``Random Person \u003cnobody AT example dot com\u003e``)\n\n##### MYFAMILY (optional)\n\n`MYFAMILY=node,node,...`\n\nDeclare that this Tor server is controlled or administered by a group or organization identical or similar to that of the other servers, defined by their identity fingerprints. When two servers both declare that they are in the same 'family', Tor clients will not use them in the same circuit. (Each server only needs to list the other servers in its family; it doesn’t need to list itself, but it won’t hurt.) Do not list any bridge relay as it would compromise its concealment.\n\nWhen listing a node, it’s better to list it by fingerprint than by nickname: fingerprints are more reliable.\n\n(Default: *empty*)\n\n##### ADDRESS (optional)\n\n`ADDRESS=tor-node01.example.com`\n\nThe IPv4 address of this server, or a fully qualified domain name of this server that resolves to an IPv4 address.  You can leave this unset, and Tor will try to guess your IPv4 address.  This IPv4 address is the one used to tell clients and other servers where to find your Tor server; it doesn't affect the address that your server binds to.  It also seems to work with an IPv6 address.\n\n##### SOCKS_PORT (optional)\n\n`SOCKS_PORT=9050`\n\nPort for the SOCKS proxy. If set, Tor will listen on this port for SOCKS connections. If you use `docker compose`, you must also uncomment the corresponding port mapping in `docker-compose.yml` to make it reachable from the host.\n\n(Default: *empty*)\n\n##### SOCKS_POLICY (optional)\n\n`SOCKS_POLICY=accept *`\n\nAccess-control policy for the SOCKS proxy. If unset, all connections to SocksPort are accepted (potential security risk).\n\n(Default: *empty*)\n\n##### TZ (optional)\n\n`TZ=Europe/Berlin`\n\nConfigure the system timezone for the container. If unset, the container uses UTC.\n\n(Default: *empty*)\n\n##### RELAY_BANDWIDTH_RATE (optional)\n\n`RELAY_BANDWIDTH_RATE=value`\n\nAverage bandwidth limit for the relay (e.g., 100 KBytes). This allows the relay to use up to the specified rate, but averages the usage over time.\n\n(Default: *empty*)\n\n##### RELAY_BANDWIDTH_BURST (optional)\n\n`RELAY_BANDWIDTH_BURST=value`\n\nMaximum bandwidth burst for the relay (e.g., 200 KBytes). This allows short bursts above the average rate, but still limits the maximum rate.\n\n(Default: *empty*)\n\n## Feedback\n\nPlease report any problems as issues on [github](https://github.com/svengo/docker-tor/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvengo%2Fdocker-tor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvengo%2Fdocker-tor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvengo%2Fdocker-tor/lists"}