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://charlie2bm2qrzthb4a6ew6u5y4vghjcqj4jv6n26knrjlzb5xd7zfid.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.
brew install mkp224o
Then I ran the following command:
mkp224o charlie -t 7 -v -d ~/Tor
charlie specifies the prefix of the .onion address. The
-t 7 specifies that I want to use 7 CPU threads. The
-v specifies that I want verbose output. The
-d ~/Tor specifies that I want to save the keys in the
~/Tor directory that will be created for you.
After letting it run overnight I had a bunch of vanity addresses I could choose from. I chose the one that I liked the most and used it for my Tor Onion Service.
It's important to note that this step is optional. You can skip this step and just use the default .onion address that Tor generates for you.
Additionally, the more characters you set in your prefix, the longer it will take to generate a vanity address. Although doing
charliefish would have been cool, I estimate it would have taken hundreds of years to generate.
I'm assuming that you have a server ready to setup your Tor Onion Service on. I'm running it on a Ubuntu 22.04.3 LTS server. I'm also assuming that you have root access to the server.
So I'll run the following command to install Nginx:
sudo apt install nginx
Let's now configure Nginx to serve our website. Let's modify the default Nginx configuration file:
sudo nano /etc/nginx/nginx.conf
Uncomment the following lines:
Then add the following line:
These options modify the nginx configuration to be more secure.
Now let's restart nginx:
sudo systemctl restart nginx
Let's modify our website by going to the following directory:
Now let's create a file called
sudo nano index.html
Add your contents that you want to your website.
To install Tor, run the following command:
sudo apt install tor
sudo nano /etc/tor/torrc
Now we need to comment out the following lines:
HiddenServiceDir /var/lib/tor/hidden_service/ HiddenServicePort 80 127.0.0.1:80
Now run the following command to restart Tor:
sudo systemctl restart tor
If you decided to create a vanity address in step 0, then you need to copy the contents from the
~/Tor/domainhere.onion directory to the
Then restart Tor again.
Now open your Tor Browser and navigate to your onion URL. You should be able to find your onion URL by running the following command:
sudo cat /var/lib/tor/hidden_service/hostname
And that's it! Super simple and easy to create a Tor Onion Service. Good luck in creating your own Tor Onion Service!