How To Host Your Own .onion Website in Dark Web

Posted by

We have learns how Tor network works and how to use it in our Tor tutorial. As we know dark websites use .onion for their top-level domain(TLD). Here the question comes can we create our own website in Dark Web using our Kali Linux system? The answer is yes easily.

In this post, we are going to learn how we can host own .onion dark web in Kali Linux.

First of all, we install and configure the Tor service. To do that we run following command in our Kali Linux Terminal:

apt-get install tor

We press y for yes when it prompts for storage permission. The screenshot of the command is the following:

install tor in Kali Linux

Then we need to configure torrc file located on /etc/tor/torrc . So we apply the following command :

leafpad /etc/tor/torrc

The screenshot is following:

configuring torrc

Then we need to find these two lines (showing in the above picture) and remove # from both lines and save the file. After doing this will look like the following :
configure torrc

Then we restart Tor by using the following command:

service tor restart

Now we create a web page on our desktop called index.html or index.php. We do it by using

cd Desktop && touch index.html

Then we edit the web page file and code a simple website for a demo. We open the html/php file in leafpad

leafpad index.html

And then we write a simple html code like following:

demo html website

Then we save and close this file. This file is in our Desktop, so we start a php based localhost server in our Desktop using the following command:

php -S 127.0.0.1:80
php based web server

Now we check our hosted localhost website, by navigating 127.0.0.1 from our browser.

Then we leave this terminal window as it is. Then we open another terminal and type tor in the command line.

tor

Let wait a bit and let it configure to 100%.
The screenshot is following:

php webserver connects with tor

All set our dark web is hosted. Hey wait, where is the .onion link?

.onion link is generated randomly. To see our hosted demon dark website’s .onion we open another terminal window (3rd time, because we can’t close or use those terminals, otherwise the connection will be lost.) and type the following command to see our Dark Web address

cat /var/lib/tor/hidden_service/hostname

The screenshot is following:

onion website link

Now we can access this .onion website with Tor browser from anywhere.

This is a demo website for education purpose, but we can host any kind of website. Please do not abuse this to host illegal websites. That will be a crime and we are not responsible for that.

Feel free to leave a comment below or reach me on Instagram @iamshubhamkumar__.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.