Alpine-based container image for running Tor in four deployment modes:
proxymiddlebridgeexit
The image builds Tor from source and provides a small entrypoint wrapper that generates the mode-specific torrc settings from environment variables.
Pull the published image:
docker pull jfwenisch/alpine-torBuild locally:
docker build -t jfwenisch/alpine-tor .Build a specific Tor version:
docker build -t jfwenisch/alpine-tor --build-arg TORVERSION=tor-0.4.9.9 .The container supports four modes through the mode environment variable.
Runs Tor as a client and exposes a SOCKS proxy.
docker run --rm -e mode=proxy -e SOCKSPort=9050 -p 9050:9050 jfwenisch/alpine-torRuns a non-exit relay. This is the usual starting point for running a public Tor relay.
docker run --rm -e mode=middle -e ORPort=443 -p 443:443 jfwenisch/alpine-torRuns an obfs4 bridge. This requires both Tor's ORPort and a separate obfs4 transport port.
docker run --rm -e mode=bridge -e ORPort=443 -e TransportPort=4444 -p 443:443 -p 4444:4444 jfwenisch/alpine-torRuns an exit relay. ORPort is required. DirPort is optional and deprecated upstream for most setups.
docker run --rm -e mode=exit -e ORPort=443 -p 443:443 jfwenisch/alpine-torIf you want to serve an exit notice page anyway, also set DirPort and DirPortFrontPage.
Raw Kubernetes manifests live in manifests/README.md.
Available files:
manifests/alpine-tor-proxy.deployment.yamlmanifests/alpine-tor-middle.deployment.yamlmanifests/alpine-tor-bridge.deployment.yamlmanifests/alpine-tor-exit.deployment.yaml
Quickstart:
kubectl apply -f manifests/alpine-tor-proxy.deployment.yamlThe detailed manifest descriptions, exposed ports, and file-by-file notes are in manifests/README.md.
The Helm chart lives in charts/README.md.
Quickstart:
helm install alpine-tor-proxy ./charts --set mode=proxyBridge example:
helm install alpine-tor-bridge ./charts --set mode=bridge --set service.tororport=443 --set service.tortransportport=4444For chart values, persistence, NodePort behavior, and mode-specific examples, see charts/README.md.
- Bridge mode requires both
ORPortandTransportPort. - Middle and exit modes require
ORPort. - Proxy mode requires
SOCKSPort. - For public relay operation, setting
ContactInfoandNicknameis strongly recommended. - For bridge and relay reachability behind NAT or load balancers, you may need to set
Address.