How to Create a Tor hidden Service

Ever wondered how people make darkweb websites? Here's how you can make your own! In a step by step tutorial!

How to Create a Tor hidden Service

Ever wondered how people make darkweb websites? Heres how you can make your own! In a step by step tutorial!


Time required: an few hours, or 30 - 60 mins if your hackerman😎


1) tor websites are cool! ive always wondered how hard it was to setup one

Turns out? quite easy!

Lets get crack'in!😎

Setup a linux server

I used to spin up a simple linux box

the 4usd per month one is fine

Connect to your server

ssh root@<IP HERE>
ssh [email protected]

Use the password you set in the creation page

Grab a sample html website

cd ~
mkdir website
cd website

heres the full html page

Install Tor

apt update
apt install tor
service tor status
# if tor isnt running make sure its actually installed

# to stop
service tor stop
# restart
service tor restart
Note: use 'sudo' if its complaining

Overview of important files & Directories

Torrc File (ToreRC)

setups all the confirguation for your tor server, in this case we only edit two config settings


Where tor stores your project's host name (.onion) and crypto

/var/lib/tor/\<PROJECT NAME>



Website code folder




Steps in order

nano /etc/tor/torrc

edit lines ~71, ~72

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80


HiddenServiceDir /var/lib/tor/<NAME OF PROJECT>/
HiddenServicePort 80


HiddenServiceDir /var/lib/tor/website/
HiddenServicePort 80


Restart tor

when tor first installs this director doesnt exist, only after  setting the config HiddenServiceDir as seen below does this folder pop up with your tor .onion address
ls /var/lib/tor/
service tor restart
ls /var/lib/tor/

if you dont see a website directory something has gone wrong make sure you edited the config torrc file /var/lib/tor/website/ is set

should look like this one your done (minus the _old folder)


Lets use a python simple server to test if its working

the steps up to this point in the terminal

run the following

cd ~/website
python3 -m http.server  80 --bind

What --bind means?

and what is 80?

--bind  = HiddenServicePort 80

the must match to what --bind has

are what ip address the server will allow to connect from. means only localhost (only your computer) means anyone can connect.

   not recommend if you want to keep the page a tor only website

Lets get the tor .onion address

And visit the website over TOR!

cd /var/lib/tor/website
cat /var/lib/tor/website/hostname

Copy this XXXXXXXXXXXXXXXXXXXXX.onion address

Open brave.exe or download if you dont have it

Open Tor enabled brave Tab

when brave is open use the command


for a tor mode browser tab to open

First Try will probibly look like this

meaning? the server isnt running!

cd ~/website
python3 -m http.server  80 --bind

still nothing?

make sure torrc was set correctly and restart tor


HiddenServiceDir /var/lib/tor/website/
HiddenServicePort 80

Restart tor

service tor restart

check to see if tor is running

service tor status

If everything went to plan...

This is what success looks like!

Congrats! 🎊🎊🎊

you now are the proud owner of a tor website


Out of scope But....

the python -m http.server doesnt last for ever.  

I recommend install something more permanent

Server SoftwareDescriptionSetup/Installation Command
Apache HTTP ServerA widely used and highly configurable server.- On Linux: sudo apt-get install apache2 - On Windows: Download from
NginxKnown for its high performance and scalability.- On Linux: sudo apt-get install nginx - On Windows: Download from
LighttpdA lightweight and fast web server.- On Linux: sudo apt-get install lighttpd - On Windows: Download from
CaddyAn easy-to-configure web server with HTTPS.Down


Note: the post was inspired by john Hammond

Tor setup "tutorial" (not really step by step throgh)

Tor Project | Set up Your Onion Service
Defend yourself against tracking and surveillance. Circumvent censorship. | Set up Your Onion Service

How to use pythons http.server

http.server — HTTP servers
Source code: Lib/http/ This module defines classes for implementing HTTP servers. Availability: not Emscripten, not WASI. This module does not work or is not available on WebAssembly platf…

Security best practaces for running tor stuff

Hosting Onion Services -
The Onion Router

Random history about .onion Top level domains TLD being approved

Tor’s .onion domain approved by IETF/IANA
The Tor project gained an important piece of official recognitionthis week when two key Internet oversight bodies gave their stamp ofapproval to Tor’s .onion top-level domain (TLD). While .onion has been inuse on the Tor network for several years, it was always as a “pseudo-domain” in the past.…


by oran collins

If you want to help me out and give some donations here's my monero address: 432ZNGoNLjTXZHz7UCJ8HLQQsRGDHXRRVLJi5yoqu719Mp31x4EQWKaQ9DCQ5p2FvjQ8mJSQHbD9WVmFNhctJsjkLVHpDEZ I use a tracker that is pravicy focused so if you block its cool, im big on blocking stuff on my own machine. im doing it to see if anyone is actualy reading my blog posts...:)