Skip to content

linux-universe/simple-dockerfile-for-tor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

simple dockerfile for hosting a tor website

Dockerfile

Example of a possible Docker Compose with it: Create the Caddyfile and torrc before you create the container. You don't need to open any ports for Caddy, because Tor will access it via the Docker network.

services:
  tor:
    build: .
    volumes:
       - ./tor:/var/lib/tor/ 
       - ./torrc:/etc/tor/torrc
    restart: unless-stopped

  caddy:
    image: caddy:latest
    restart: unless-stopped
    volumes:
      - ./caddy/Caddyfile:/etc/caddy/Caddyfile
      - ./caddy/site:/srv
      - ./caddy/caddy_data:/data
      - ./caddy/caddy_config:/config

An example of the torrc

 HiddenServiceDir /var/lib/tor/example
 HiddenServicePort 80 caddy:80

An example of the Caddyfile

:80 {
        file_server
}

About

simple docker file for tor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published