Sponsoredexternal pick

Tor Website Hosting

A beginner's guide to hosting on Tor, providing step-by-step instructions and essential tips for your hidden service.

Written:
A person engrossed in setting up a Tor hidden service on their laptop, with notes and coffee nearby.
Setting up a Tor hidden service securely and anonymously.

Tor website hosting lets you run a hidden service accessible only through the Tor browser, using a cryptographically generated .onion address that's 56 characters long[1]. You'll need to:

  • Install Tor and configure two lines in your torrc file: HiddenServiceDir and HiddenServicePort[1]

  • Keep your private keys secure in a separate directory from your web server's document root[2]

  • Use nginx or lighttpd instead of Apache for better anonymity[2]

Around 30,000 hidden services announce themselves daily, though they represent only 3.4% of total Tor traffic[3].

Tor Website Hosting Decision Flowchart

CriteriaSelf-HostingManaged Hosting
Technical SkillsRequires basic server knowledgeNo technical skills needed
BudgetLower cost, depends on server specsHigher cost, monthly fees
Uptime NeedsYou control uptime, depends on setupGuaranteed uptime, depends on provider
Configuration VerificationManual setup, requires checksProvider handles setup and checks
Security ChecksYou manage security measuresProvider ensures security compliance
Testing StepsYou must test functionalityProvider conducts tests before launch

What Is Tor Website Hosting and How Does It Work

Tor website hosting allows you to create a hidden service that only users of the Tor network can access. This is different from regular websites, which are typically hosted on the clearnet and can be accessed by anyone with a standard browser. A hidden service uses a special .onion domain, which is not indexed by search engines and cannot be reached without the Tor Browser.

Hidden Services vs Regular Websites

  • Hidden Services: Accessible only through the Tor network, these services use .onion addresses, which are cryptographically generated and typically 56 characters long[1]. They offer increased privacy and anonymity.

  • Regular Websites: These are hosted on the clearnet and use standard domain names like .com or .org. They can be accessed by anyone without special tools.

How .onion Domains Function

.onion domains are unique because they cannot be registered through traditional DNS services. Instead, their ownership is determined by a public/private key pair, meaning you control your .onion domain as long as you maintain the corresponding private key[4]. This makes them inherently more secure but also more complex to manage.

Hosting on Tor vs Accessing Tor

When you host a website on Tor, you're setting up a hidden service, which requires specific configuration in your torrc file. You need to specify the directory for your cryptographic keys and the port for your service[1]. In contrast, accessing Tor simply means using the Tor Browser to navigate to these hidden services or regular websites on the clearnet.

Basics of Encrypted Routing

Tor uses a method called onion routing to encrypt your internet traffic. When you access a hidden service, your data is sent through multiple nodes in the Tor network, each adding a layer of encryption. This process ensures that no single node knows both your identity and the content of your communication. It's like sending a letter in a series of envelopes, where each envelope is opened only by the next node, keeping your information safe and private.

This method is effective for maintaining anonymity, but it’s important to keep in mind that while Tor provides significant privacy, it’s not foolproof. You should always follow best practices for operational security when hosting or accessing services on the Tor network.

Requirements Before You Start Hosting on Tor

Before launching your hidden service on the Tor network, you need to ensure you have the right hardware, software, and knowledge. Here’s what you should consider:

Hardware and Software Prerequisites

  1. Computer Specs: A basic computer can suffice. However, for better performance, aim for:
    • CPU: Dual-core or better

    • RAM: At least 2 GB

    • Storage: SSD recommended for faster access

  2. Operating System: You can use various operating systems, but Linux (like Ubuntu or Debian) is preferred for its stability and security. Windows is also an option, but it may require additional configuration.

Bandwidth and Uptime Considerations

  • Bandwidth: Hidden services on Tor can consume significant data. Expect to handle at least 1 Mbps for basic services. Higher traffic requires more bandwidth, so consider your content and expected users.

  • Uptime: You need to decide how much uptime your service requires. Self-hosting allows you to control uptime, but managed solutions usually guarantee it, which can be crucial for user accessibility.

Legal Considerations and Content Policies

Running a hidden service does not exempt you from legal obligations. Content policies vary by jurisdiction, so ensure you comply with local laws regarding the type of content you host. Additionally, be aware that some activities on Tor may attract law enforcement attention.

Technical Skills Needed

  • Self-Hosting: If you opt for self-hosting, basic server knowledge is essential. You need to configure your torrc file and manage security measures manually.

  • Managed Solutions: If you prefer not to deal with technicalities, managed hosting services can set everything up for you, making the process easier for beginners.

Summary Checklist

Before starting, make sure you have:

  • A suitable computer with adequate specs.

  • A compatible operating system (preferably Linux).

  • Enough bandwidth for your expected traffic.

  • An understanding of legal implications related to your content.

  • Either the technical skills for self-hosting or a managed hosting solution to handle the setup for you.

With these requirements in mind, you're ready to take the next steps toward hosting on Tor!

Method 1: Self-Hosting a Tor Hidden Service

Setting up a Tor hidden service involves several steps. Here’s a straightforward guide to get you started.

Step 1: Install Tor

First, you need to install the Tor software. On a Linux system, you can typically do this via your package manager. For example, on Ubuntu, run:

sudo apt update
sudo apt install tor

Step 2: Configure the torrc File

Next, you’ll configure the Tor settings. Open the torrc configuration file:

sudo nano /etc/tor/torrc

Add the following lines:

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:8080
  • HiddenServiceDir specifies where your cryptographic keys will be stored. Keep this directory secure and separate from your web server’s document root[2].

  • HiddenServicePort maps the port of your hidden service to your local web server (e.g., on port 8080).

Step 3: Generate Your .onion Address

After saving the configuration, restart Tor:

sudo systemctl restart tor

Tor will generate your .onion address, which you can find in the hostname file located in your specified HiddenServiceDir. This address is 56 characters long and unique to your service[1].

Step 4: Set Up a Web Server

You’ll need a web server to host your content. While Apache can be used, nginx is preferred for anonymity and performance[2]. Here’s a simple setup for nginx:

  1. Install nginx:

    sudo apt install nginx
    
  2. Create a configuration file for your site in /etc/nginx/sites-available/ and link it to sites-enabled.

  3. Ensure that your web server listens on the specified port (8080 in this example).

Step 5: Port Forwarding (Not Required)

For hidden services, traditional port forwarding is unnecessary since Tor handles the routing. However, if you were hosting on the clearnet, you’d typically forward ports on your router to direct traffic to your server.

Step 6: Keeping Your Server Running

To keep your hidden service online 24/7, consider the following:

  • Use a reliable power source and network connection.

  • Configure your server to automatically restart on failures. For instance, using systemd, you can set Restart=always in your service file.

Step 7: Security Hardening Essentials

To enhance security:

  • Regularly update your software to patch vulnerabilities.

  • Use Unix sockets instead of TCP sockets to prevent leaking your service to the local network[1].

  • Implement a firewall to restrict access to your server, allowing only necessary traffic.

By following these steps, you can effectively set up a self-hosted Tor hidden service. Be mindful of your operational security to maintain anonymity and protect your content.

Method 2: Using Tor Hosting Providers

Choosing managed hosting over self-hosting can simplify your experience significantly. If you lack technical skills, prefer not to manage server configurations, or want guaranteed uptime, a managed hosting provider is the way to go. Managed solutions handle the technical aspects, allowing you to focus on your content rather than server administration.

Types of Providers

There are various types of hosting providers for Tor services:

  • Dedicated Tor Servers: These are servers specifically configured for hosting .onion sites. They offer high performance and complete control over your environment.

  • VPS with Tor Support: Virtual Private Servers (VPS) can be configured to support Tor. This option is often more cost-effective than dedicated servers while still providing a degree of control and customisation.

What to Look for in a Provider

When selecting a Tor hosting provider, keep these criteria in mind:

  • Privacy Policy: Ensure the provider has a strong privacy policy that aligns with your needs. Look for details on data retention and user anonymity.

  • .onion Domain Support: Confirm that the provider supports .onion domains and can assist you in setting up your hidden service.

  • Control Panel Access: A user-friendly control panel can make managing your service much easier. Look for providers that offer intuitive interfaces for managing your server settings.

Cost Ranges

Costs can vary widely based on the type of service and features offered:

  • Dedicated Tor Servers: Expect to pay between $50 and $150 per month, depending on performance specifications and additional features.

  • VPS with Tor Support: These can range from $10 to $60 per month, making them a more budget-friendly option.

These prices can fluctuate based on the provider and specific configurations. Always compare options to find the best fit for your needs.

Using a managed hosting provider can streamline your journey into the Tor network, allowing you to launch your hidden service with less hassle and more focus on what you want to share with the world.

How to Get and Configure Your .onion Domain

Creating a .onion domain is a straightforward process, but it involves some unique characteristics compared to traditional domain registration.

Understanding .onion Address Generation

.onion addresses are generated using a public/private key pair, ensuring that ownership is determined by the control of the private key[4]. There are two types of .onion addresses:

  1. Random Addresses: These are automatically generated and consist of 56 characters, making them secure but not memorable.

  2. Vanity Addresses: These are custom addresses that can include specific patterns or words, making them easier to remember. However, generating a vanity address can take a significant amount of time, depending on the complexity of the desired string. Tools for generating vanity addresses are available, but they can require from several hours to days of processing power.

Setting Up Your .onion Domain

To set up your .onion domain, you need to configure your Tor service. In your torrc configuration file, you will add two lines:

  • HiddenServiceDir: This specifies the directory where your cryptographic keys will be stored.

  • HiddenServicePort: This defines the local port that your web service will use.

Here is an example of what to include in your torrc file:

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

After saving this file and restarting the Tor service, your .onion address will be generated and saved in the hostname file located in the specified directory[1].

v3 vs Older Onion Addresses

There are two main versions of onion addresses. Version 3 (v3) addresses, introduced in 2021, are 56 characters long and are the only supported format since version 0.4.6.1-alpha of Tor[1]. Version 2 addresses are no longer supported, which means if you set up a hidden service today, you will automatically receive a v3 address.

When configuring your service, ensure that you are aware of these differences; using an outdated version could lead to compatibility issues and reduced security.

Pointing Your Domain to Your Service

Unlike traditional domains, .onion addresses do not require DNS registration. You simply use the generated .onion address directly in your web browser (via Tor Browser) to access your hidden service. There’s no need for DNS servers, as access is entirely managed through the Tor network[4].

By following these steps, you can successfully get and configure your .onion domain and begin your journey in the Tor network.

Hosting WordPress or Other CMS on Tor

Hosting a WordPress site or another CMS on Tor requires specific configurations and considerations. Here’s what you need to know.

Database Setup and Configuration

When using a CMS like WordPress, you’ll need to set up a database. MySQL or MariaDB is common. Here’s a simple checklist for your database setup:

  1. Install MySQL/MariaDB:

    sudo apt install mariadb-server
    
  2. Secure the Installation: Run the security script to remove default settings:

    sudo mysql_secure_installation
    
  3. Create a Database: Log into the database and create a new database for WordPress:

    mysql -u root -p
    CREATE DATABASE wordpress;
    GRANT ALL PRIVILEGES ON wordpress.* TO 'wp_user'@'localhost' IDENTIFIED BY 'your_password';
    FLUSH PRIVILEGES;
    EXIT;
    

Configuration Adjustments

WordPress has some specific settings to optimise it for Tor. Here are key adjustments:

  • Site URL: Set the site URL to your .onion address, ensuring users access your site correctly.

  • Permalinks: Configure permalinks for better URL structure using the settings in the WordPress admin panel.

Plugin Compatibility and Security Concerns

Not all WordPress plugins work seamlessly on Tor. Here are some tips:

  • Avoid Analytics Plugins: Most analytics tools track user data, which contradicts the anonymity ethos of Tor.

  • Security Plugins: Use plugins that enhance security, such as Wordfence, but ensure they do not compromise performance.

Performance Optimisation

The Tor network typically has slower speeds; thus, performance optimisation is crucial. Here are some strategies:

  • Caching Plugins: Use plugins like WP Super Cache to store static versions of your pages.

  • Minimalist Themes: Choose lightweight themes that load quickly. A theme with fewer scripts and styles will perform better on Tor.

Additional Tips

  • Use Nginx: Consider using Nginx instead of Apache, as it’s generally more efficient and better suited for handling multiple connections[2].

  • Regular Backups: Schedule regular backups of your WordPress site and database to prevent data loss.

By following these guidelines, you can successfully host a WordPress site or another CMS on the Tor network while maintaining security and performance.

Security and Privacy Best Practices

To effectively protect your hidden service, you need to adopt robust security and privacy practices. Here’s what you should focus on.

Operational Security

Separating your identity from your hosting activities is crucial. Always use pseudonyms and avoid linking your real-world identity with your .onion domain. This is especially important if you plan to interact with users, as any identifiable information can compromise your anonymity.

Server Hardening Steps

To enhance the security of your server, consider the following steps:

  • Use Unix Sockets: Configure your hidden service to run over Unix sockets instead of TCP sockets. This helps prevent accidental exposure of your service to the local network[1].

  • Firewall Configuration: Set up a firewall to restrict access to only necessary ports and services. This minimises the attack surface of your server.

  • Regular Updates: Keep your server and software up to date. Regularly apply security patches to fix vulnerabilities.

Backup Strategies

Implement a solid backup plan to safeguard your data. Here are key points to consider:

  • Automated Backups: Schedule automated backups of your website files and databases. Use tools like rsync or tar for file backups and mysqldump for database backups.

  • Offsite Storage: Store backups in a secure offsite location. This protects your data in case of server failure or compromise.

Common Mistakes to Avoid

Several pitfalls can compromise your anonymity. Be cautious of the following:

  • Logging: Avoid enabling logging features on your web server. Logs can reveal your IP address and other identifying information.

  • Third-Party Scripts: Refrain from using third-party scripts or services that track user data. These can leak metadata that might expose your identity.

  • Metadata Leaks: Ensure that any files you upload do not contain metadata that could be traced back to you. Use tools to strip metadata from images and documents before sharing.

By adhering to these best practices, you can significantly enhance the security and privacy of your hidden service, helping you navigate the Tor network safely.

Common Problems and How to Fix Them

Hosting a hidden service on the Tor network can come with its own set of challenges. Here’s how to tackle some common issues you might encounter.

Address Connection Issues

If your .onion address is not reachable, it could be due to configuration errors or network problems. Here’s how to troubleshoot:

  1. Check Your Configuration: Ensure that you’ve correctly set up your torrc file. You should have the following lines:

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

    If these lines are missing or incorrect, your service won’t work[1].

  2. Restart Tor Service: After making changes, restart your Tor service to apply the new settings. Use the command:

    sudo systemctl restart tor
    
  3. Firewall Settings: Verify that your firewall is not blocking the necessary ports. Ensure that port 80 (or whatever port you specified) is open.

Troubleshooting .onion Address

If your .onion address isn’t working, consider the following:

  • Correct Format: Make sure you’re using a valid v3 onion address, which is 56 characters long[1]. Addresses from version 2 are no longer supported.

  • Access via Tor Browser: Always access your .onion service through the Tor Browser. Regular browsers will not resolve these addresses.

Performance Problems and Slow Loading

If your hidden service is loading slowly, here are some possible solutions:

  • Network Conditions: Remember that the Tor network can be slower than typical internet connections. It’s normal for speeds to fluctuate based on network traffic.

  • Server Resources: Ensure your server has adequate resources. If you're on a VPS, consider upgrading your plan if you notice consistent slowdowns.

  • Use Caching: Implement caching solutions if you’re running a web application like WordPress. This can significantly improve loading times.

What to Do If Service Goes Down

If your hidden service goes down, follow these steps:

  1. Check Server Status: Log into your server and check if the Tor service is running. You can use:

    sudo systemctl status tor
    
  2. Review Logs: Check the Tor logs for any error messages. Logs are typically found in /var/log/tor/tor.log. This can give you clues about what went wrong.

  3. Reboot the Server: If all else fails, consider rebooting your server. Sometimes, a fresh start can resolve issues.

By following these troubleshooting steps, you can effectively address and resolve common problems when hosting a hidden service on the Tor network.

Your questions, answered

Are Tor browsers still used?

Yes, Tor Browser remains widely used. On October 26, 2024, 1.95 million users connected directly to the Tor network worldwide, and the browser reached its peak usage on October 21, 2023, with over nine million daily users[5]. Between January and December 2024, Germany led with 1,085,893 mean daily users (35.14%), followed by the United States with 440,994 users (14.27%)[6].

What are onion links?

Onion links are special web addresses ending in .onion that can only be accessed through the Tor network. These addresses are derived from cryptographic key pairs rather than traditional DNS registration, meaning ownership comes solely from controlling the corresponding public/private keys[4]. Version 3 onion addresses are 56 characters long and have been the only supported format since Tor release 0.4.6.1-alpha in 2021[1].

Can Google access .onion sites?

No, Google and other search engines cannot access .onion sites through normal crawling. DNS servers are explicitly prohibited from answering queries for .onion domains, and DNS registrars must deny all registration requests for these names[4]. The .onion namespace exists entirely within the Tor network and is unreachable from the regular internet.

What are onion sites used for

Onion sites serve various purposes, from privacy-focused communication to hosting content that requires anonymity. Approximately 30,000 hidden services announce themselves to the Tor network daily, though hidden service traffic represents only 3.4% of total Tor usage[3]. In a 2024 study, 49.72% of onion addresses were advertised exclusively on the surface web, while 5.79% appeared only on the dark web[7].

How to access onion sites

You need Tor Browser to access onion sites, as regular browsers cannot resolve .onion addresses. Download Tor Browser from the official Tor Project website, install it, and then paste the full .onion address (including the .onion extension) into the address bar. The browser will route your connection through the Tor network to reach the hidden service.

How do I host a wordpress blog on tor?

Install WordPress on your server with a database (MySQL or MariaDB), then configure Tor by adding HiddenServiceDir and HiddenServicePort lines to your torrc file[1]. Set your WordPress site URL to the generated .onion address, avoid analytics plugins that track users, and use caching plugins like WP Super Cache to improve performance. Consider using nginx instead of Apache for better efficiency when handling Tor connections[2].

How can I host my website on Tor Browser?

You host your website on the Tor network (not in the browser itself) by setting up a web server and configuring Tor as a hidden service. Add two lines to your torrc configuration file: HiddenServiceDir to specify where cryptographic keys are stored, and HiddenServicePort to define the virtual port and local redirect[1]. After restarting Tor, your .onion address will be generated in the hostname file within your specified directory.

Key Takeaways

Here's what you need to remember before launching your hidden service:

  • Configuration is straightforward: Add two lines to your torrc file (HiddenServiceDir and HiddenServicePort), restart Tor, and your .onion address generates automatically[1].

  • Security comes first: Use Unix sockets instead of TCP, disable logging entirely, and strip metadata from all uploaded files to protect your anonymity[1].

  • Performance requires optimisation: Implement caching, choose lightweight themes, and consider nginx over Apache to compensate for Tor's inherently slower speeds[2].

  • Version 3 addresses are mandatory: Only 56-character v3 onion addresses work since 2021; version 2 addresses are no longer supported[1].

  • Troubleshooting is systematic: Check your torrc configuration, verify firewall settings, and review /var/log/tor/tor.log when issues arise.

Once your hidden service is running, you'll want to make it discoverable—explore Understanding Tor URLs: Your Gateway to the Dark Web to learn how users find and verify .onion addresses.

Explore More on Tor Hosting

Dive deeper into our resources and guides.

Discover More