In this post, we’ll explore the process of setting up a website with a .onion domain within the Tor network. A .onion domain1 operates differently from traditional domains as it doesn’t rely on an IP mapping, thus preserving the anonymity of the hidden server. The creation of an .onion address involves generating a public key from a private RSA key, followed by hashing through the now-outdated SHA-1 algorithm2, and then encoding it with Base 323 to produce the distinctive .onion domain (e.g., http://oxoujukneztb6wxg.onion). It’s important to note that Base 32 encoding does not include uppercase letters or special symbols.

Note: Building an .onion website does not require a public IP address and does not involve adding port rules to your firewall.

Step-by-Step Guide to Setting Up an .onion Website

  1. Website Setup: Start by creating a website on your computer. A simple way to do this is by downloading XAMPP4 and setting it up quickly.

  2. Downloading Tor: Next, go to the Tor Project website and download the “Expert Bundle” for Windows5. Avoid selecting the browser bundle.

  3. Installation and Configuration: After downloading, unzip the files and locate tor.exe. Run it once and then close it. Navigate to the folder C:\Users\[Your Username]\AppData\Roaming\tor. Here, create a text file named torcc, remove the file extension, and open it with a text editor. Add the following lines:

    HiddenServiceDir C:\ # This will be the directory for your website's private and public key files. You can change the location if desired.
    HiddenServicePort 80 # The left number indicates the port for the hidden service, and the right one links to your local port.
  4. Launching the Hidden Service: Save the changes and run tor.exe again. Congratulations, your hidden service should now be operational! The .onion domain name will be listed in the HiddenServiceDir folder’s public key file. Ensure to safeguard your private key, while the public key can be discarded as Tor will regenerate it with each operation.