Skip to content

Document how to serve files over HTTP behind a Tor Hidden Service

Tails Greeter: Use persistence, More options - set Administration password
Start Tor Browser

Download thttpd https://packages.debian.org/squeeze/thttpd
to /home/amnesia/Persistent

Create index.html and any other files in folder /www

Create text file thttpd-tor-start
C&P the following

##begin— ##
#!/bin/bash
dpkg -i /home/amnesia/Persistent/thttpd_2.25b-11_i386.deb

## Edit “2.25b-11_i386” if different

echo “ENABLED=yes” > /etc/default/thttpd
cp -R /home/amnesia/Persistent/www /var
chmod 755 /var/www
chmod a+r /var/www/*
/etc/init.d/thttpd start

echo -n “HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 ” >> /etc/tor/torrc
hostname -I >> /etc/tor/torrc
/etc/init.d/tor restart

sleep 5
cat /var/lib/tor/hidden_service/hostname

##end— ##

Open Root Terminal
#chmod 755 /home/amnesia/Persistent/thttpd-tor-start
#/home/amnesia/Persistent/thttpd-tor-start

## Output URL is the Hidden Service address

Then either
- Save this URL
#cp -R /var/lib/tor/hidden_service /home/amnesia/Persistent

Or
- Use a previously saved hidden_service
On another unlocked and mounted Tails USB
#cp -R /media/TailsData/Persistent/hidden_service /home/amnesia/Persistent
Then /Or the live USB
#cp -R /home/amnesia/Persistent/hidden_service /var/lib/tor
Check permissions
#ls -l /var/lib/tor | grep hidden_service
And fix if neccessary
#chown debian-tor /var/lib/tor/hidden_service

Restart Tor again
#/etc/init.d/tor restart

Feature Branch: doc/7879-http-server

Attachments

Related issues

Original created by @exit-1 on 7879 (Redmine)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information