Launch a Free .onion Site on Raspberry Pi 3 with Raspbian: Step‑by‑Step Guide
Deploy a fully functional web server on your Raspberry Pi 3 and host a permanent, free .onion website using Raspbian. This guide walks you through the entire process, from installing Tor and setting up Apache, MySQL, PHP, and Joomla to configuring optional SSL for surface‑web access.
Ready to test the finished setup? Visit the working demo:
https://t0r.ch:100 (surface web) or https://darktorch5lgddvm.onion
.onion Domains Explained
The Tor network assigns each hidden service a 16‑character, random, permanent .onion address, eliminating the need for a traditional domain name. If you’re new to the surface web, deep web, and darknet distinctions, consider reading Tor Project’s overview and additional resources that clarify the differences.
Set Up Apache, MySQL, PHP, Joomla, PHPMyAdmin, and OwnCloud
Follow the detailed instructions at Hackster.io to configure a robust LAMP stack on Raspbian. Important: Delay the Let’s Encrypt SSL installation until after you’ve completed the Tor configuration, as outlined below.
Surface Web + .onion vs. .onion‑Only: SSL Considerations
- Only .onion – No domain registration required; Tor provides a permanent address. SSL is optional; you can use a self‑signed certificate or purchase an EV certificate from DigiCert.
- Surface Web + .onion – Register a conventional domain for the surface site. To enable HTTPS, obtain a Let’s Encrypt certificate for the domain (Tor does not support Let’s Encrypt for
.onionaddresses). - When using Let’s Encrypt on the surface domain, the same SSL certificate will also protect the
.onionsite, giving visitors assurance that the hidden service is authentic.
Connect Your Raspberry Pi 3 to the Tor Network
Open PuTTY and run the following commands to install and configure Tor:
sudo apt-get install vidalia
sudo /etc/init.d/tor restart
sudo chmod -R 777 /var/lib/tor
sudo /etc/init.d/tor stop
sudo nano /etc/tor/torrc
In torrc, locate the section marked #This section is just for location-hidden services and replace it with:
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80
HiddenServicePort 443 127.0.0.1:443
Save and exit (Ctrl+X, Y). Restart Tor and adjust permissions:
sudo /etc/init.d/tor start
sudo chmod -R 777 /var/lib/tor
Retrieve your new .onion address:
sudo nano /var/lib/tor/hidden_service/hostname
If you’ve installed a Let’s Encrypt certificate, you can access the site via both https:// and https://. Note that Let’s Encrypt cannot issue certificates for .onion addresses; attempting to use HTTPS without a proper certificate will trigger a mismatch warning in the Tor Browser, which can be safely ignored.
Create a Vanity .onion URL
Random .onion addresses are functional but may look unprofessional. Vanity generators like Scallion can produce a custom prefix, though the process is CPU‑intensive. For best results, generate the key on a more powerful machine:
- Download the binary: scallion‑v2.0.zip
- Extract to
Desktop/scallion-v2.0and open a command prompt. - Run:
scallion -o keys.txt -k 1024 -d 0 prefix(replaceprefixwith your desired starting characters). - Copy the generated
hostnameandprivate_keyvalues fromkeys.txtto the corresponding files in/var/lib/tor/hidden_service/on the Pi via PuTTY.
After each reboot, you may need to reset permissions:sudo chmod -R 777 /var/lib/tor
Congratulations! Your Raspberry Pi 3 now hosts a free, secure .onion website. Feel free to explore additional services like OwnCloud or PHPMyAdmin to extend your server’s functionality.
Source: Host your own free .onion website using Raspbian on RPi3
Manufacturing process
- Build a Custom Analog Multimeter: From Parts to Calibration
- Build Custom Object Sensors for LEGO Mindstorms EV3: DIY Light‑Based “Eyes”
- Monitor Your Home Temperature with a Raspberry Pi Dashboard
- Build a DIY Google Voice HAT for Your Raspberry Pi
- Control Your TV with Alexa via Arduino IoT Cloud – Step‑by‑Step Guide
- Build a PHP‑Based Web Interface to Control Your Arduino Uno
- Seamless Smart Phone Control of Home Lighting Systems
- Build an Arduino-Based ECG & Respiration Monitoring System
- Build Your Own Robot in Just One Hour with Otto DIY Kit
- Build a DIY SCARA Robot with Arduino – Step‑by‑Step Guide