Tor Hidden Services a DIY Guide

🌀 How to Install and Host a Tor Hidden Service (Ethical Use)
Hosting a Tor hidden service lets you provide a privacy-focused version of your website that’s accessible only through the Tor network. This can be useful for privacy, censorship resistance, and secure research platforms.
Hosting a Tor hidden service lets you provide a privacy-focused version of your website that’s accessible only through the Tor network. This can be useful for privacy, censorship resistance, and secure research platforms.
Step 1: Install Tor
On Debian or Ubuntu, open your terminal and run: After installation, Tor runs as a service by default.
sudo apt update && sudo apt install tor -y
Step 2: Configure a Hidden Service
Edit the Tor configuration file: Uncomment or add these lines near the bottom: This tells Tor to forward traffic on port 80 to your local web server.
sudo nano /etc/tor/torrc
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80
HiddenServicePort 80 127.0.0.1:80
Step 3: Start Your Web Server
Install a lightweight web server such as Apache or Nginx. Example for Apache: Make sure your site is accessible locally at http://127.0.0.1.
sudo apt install apache2 -y
Step 4: Enable the Hidden Service
Restart Tor so it reads your configuration: Then, check your hostname: The result will look like this: abc123examplexyz.onion
This is your Tor address — share it only with those you trust.
sudo systemctl restart tor
sudo cat /var/lib/tor/hidden_service/hostname
Step 5: Secure Your Hidden Service
Set permissions so only the Tor user can read the hidden service directory: Never expose your onion service’s IP or DNS name publicly. Keep your system updated with:
sudo chown -R debian-tor:debian-tor /var/lib/tor/hidden_service
sudo apt update && sudo apt upgrade -y
🧠 Notes for Ethical Use
Use Tor hosting for projects promoting security, privacy, and free information. Examples: Secure whistleblower dropboxes, encrypted chat portals, open-source mirrors, and censorship-free educational sites. Illegal or malicious hosting is strictly prohibited and monitored globally.
🌐 Summary Table
| Step | Action | Purpose |
| 1 | Install Tor | Creates secure relay system |
| 2 | Configure HiddenService | Links your web server to the onion address |
| 3 | Run Apache/Nginx | Hosts your actual website locally |
| 4 | Restart Tor | Generates your onion hostname |
| 5 | Secure Permissions | Prevents leaks and unauthorized access |
✅ Final Result
You now have a fully functional, privacy-respecting website accessible via a unique .onion address. Visitors using the Tor Browser can access it safely without revealing IPs or location. This setup is ideal for journalists, researchers, and educators in restricted regions.