Skip to content

Instantly share code, notes, and snippets.

@Informatic
Last active September 24, 2024 14:39
Show Gist options
  • Save Informatic/65261ffd1aee8ddae861 to your computer and use it in GitHub Desktop.
Save Informatic/65261ffd1aee8ddae861 to your computer and use it in GitHub Desktop.
Minimal Tor hidden service on OpenWRT
  1. Format your storage
  2. Configure networking (it's easiest with LuCI, or just take a look at OpenWRT howtos)
  3. Configure /storage by adding proper options in /etc/config/fstab, or, again, just clicking around in LuCI
  4. opkg update && opkg install tor
  5. Copy proper configuration, namely /etc/tor/torrc and /etc/config/uhttpd
  6. Reboot (or /etc/init.d/uhttpd restart && /etc/init.d/tor restart)
  7. Check /etc/tor/hidden_service/hostname for your public .onion address
  8. ...
  9. PROFIT!
#### /etc/config/fstab
# [ ... ]
config mount
# Put your storage partition UUID here
option uuid '0000-0000'
option target '/storage'
option enabled '1'
#### /etc/config/uhttpd
# [ ... ]
config uhttpd 'tor'
list listen_http '127.0.0.1:8000'
option home '/storage/tor'
#### /etc/tor/torrc
## Basic configuration
Log notice syslog
RunAsDaemon 1
DataDirectory /etc/tor
User tor
## Hidden service configuration
HiddenServiceDir /etc/tor/hidden_service
HiddenServicePort 80 127.0.0.1:8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment