Ever since I started browsing the web, the ‘Dark Web’ or ‘Deep Web’ has been the subject of many horror stories. From drugs to illegal weapons, you can buy it all! Now that I’m older I do realize this was (mostly) exaggerated, but now I’m left with one last, lingering question; “How do I make one myself?” and “How do websites on Tor actually work?”. In this post I’ll be detailing my journey to my very own corner on the ‘Deep Web’!
_Required resources
Contrary to what you might think, it’s pretty much the same as setting up any other website or web-server.
To make it easier I’ll be hosting it locally on a VM running Ubuntu Server (22.04). Other than that you’ll need to install Apache or Nginx and do a few tweaks!
_How do I make one myself? (Setup)
I’ll be using VirtualBox to run my VM, since we won’t be doing anything resource heavy you don’t really need to change any settings.

You can leave everything as-is, but if you want it run a bit smoother you can always increase the memory.
Before launching, go to the network settings of the VM and set your adapter to ‘Bridger Adapter’. This is the easiest way to make sure you can connect to your future website!
Launch the machine with your .iso file and set everything up! No special changes need to be made during the installation.
Once you’re all done, go ahead and install apache2 using: “sudo apt install apache2“. Try to connect to the IP address of your VM from your host machine, and you’ll end up with a webpage like this:

Succes! Now comes the part we’ve been waiting for: installing Tor. On Ubuntu this is once again very straightforward: “sudo apt install tor“. Now find your torrc file located withing the /etc/tor directory. Here you’ll need to look for ‘HiddenServiceDir‘ and ‘HiddenServicePort‘ and remove the # before them.

To make it quick and easy, we’ll not be enabling any extra settings. Now go ahead and restart the Tor service. After it start, go to the ‘HiddenServiceDir‘ directory you defined, in my case that’s /var/lib/tor/hidden_service/.
You’ll most definitely need sudo permissions to acces this directory. Within this directory you’ll find hostame. Within this file you’ll find your .onion address! Try to connect to this address trough Tor on your host machine, you’ll end up with the same webpage made by Apache2, but on Tor:

What this means is, that everything you change in /var/www/html will also be changed on Tor! Here’s a small example:

Now that I’ve answered the question: “How do I make one myself?”, which was pretty easy, I’ll answer “How do websites on Tor actually work?”.
_How do websites on Tor actually work?
Lorem
_Extra security
Lorem
_Conclusion
Lorem