Simple Guide to Create Your Own Onion Website

June 25, 2024 (2mo ago)

Tor logo

This is a quick guide on how to create a Tor Onion Service. In fact, I have created a Tor Onion Service for this blog. You can access it at

http://7wn4efkfmrqrny4zj6b6nzexsd4wwkm72eues2ir2dudnryokmqb55yd.onion/

using the Tor Browser or any other Tor compatible browser.

First of all, I want to stress that although lots of illegal activity can (and does) occur on the dark web, not all dark web activity is illegal. For example, DuckDuckGo has a Tor Onion Service at:

https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/

Providing privacy and anonymity to users is a legitimate use of the dark web. Please do not use dark web for illegal purposes.

Requirements :

  • Apache2/Nginx
  • Tor

Installing Apache2

Run this in your terminal to install Apache2

sudo apt-get install apache2

Installing Tor

Run this in your terminal to install Tor

 sudo apt-get install tor

After installing Apache2 and Tor we need to run Tor services and check the status. Run the following in your terminal to start Tor services

sudo systemctl start tor

To check the status of Tor service run the following in your terminal

sudo systemctl start tor

To check the status of Tor service run the following in your terminal

sudo systemctl status tor

After the running the above in terminal the expected output should be something like this

Tor logo

Now, jump to the torrc file which is located into /etc/tor . Just run the following in your terminal

sudo nano /etc/tor/torrc

After opening torrc file in terminal scroll down to this section

Tor logo

Remove # from the highlighted sections as guided in the above image.

Under that, section you can see two more lines related to hidden services

#HiddenServiceDir /var/lib/tor/other_hidden_service/
#HiddenServicePort 80 127.0.0.1:80

You can change the directory name from “hidden_service” to anything you want.

Remove comments / ‘#’ sign and Don’t change anywhere except these 2 lines.

The final torrc file after edits will look like this

Tor logo

Save the file by pressing CTRL+X -> Y -> Enter

Now restart your tor services and check the status by using

sudo systemctl restart tor
sudo systemctl status tor
Tor logo

Now your Onion domain is created. You can find the url in hostname file located in directory /var/lib/tor/hidden_service

You should be able to find your onion URL by running the following command

sudo cat /var/lib/tor/hidden_service/hostname
Tor logo

In the same directory /var/lib/tor/hidden_service you can find the public key, secret key, hostname .

Start webserver (Apache2) to access website , using following command

sudo service apache2 start

Now, you guys are ready to access your website, copy your domain name and paste it into your TOR browser.

Tor logo

The site is completely working, to change the website content go to

cd /var/www/html

Conclusion

And that’s it! Super simple and easy to create a Tor Onion Service. Good luck in creating your own Tor Onion Service!

Bonus

  • Don’t forget to restart your tor service, if you make any changes into system.
  • Always use latest version of TOR browser and TOR service.
  • Do not use this for illegal purpose. As a good people we should keep internet clean. So, say no to bad things.
  • To make your website online, you need to keep enable your web services and TOR services at same time.If either one service get disable then your website would not work.
  • If you want to make your service disable then, you have to do the following
# 1) Disable Tor services
sudo service tor stop

# 2) Disable your web server
sudo service apache2 stop

# 3) Jump on the file
sudo nano /etc/tor/torrc (Comments the 2 lines which we uncomment before)

#HiddenServiceDir /var/lib/tor/hidden_service/
#HiddenServicePort 80 127.0.0.1:80

# 4) Delete all the files from
/var/lib/tor/hidden_services

🎉 Congratulations! You just created your own onion website !

Have any Questions ? Connect on X