How to Create a Hidden Service Tor Site to Set Up an Anonymous Website or Server

Chris Hoffman 02-04-2012

Tor is an anonymous, secure network that allows anyone to access websites with anonymity. People normally use Tor to access normal websites, but they don’t have to. If you want to set up your own anonymous website, you can create a hidden service Tor site. Your hidden service website runs entirely within Tor, so no one will know who created and runs the website. Only people using Tor can access it, though. Hidden service Tor sites are ideal for anyone who wants to set up a website anonymously, such as political activists in repressive countries How To Quickly Check If Your Site Is Visible Behind The Great Firewall Of China The Great Firewall of China, officially known as the Golden Shield project, uses a variety of methods to block foreign websites that the Chinese government doesn’t like. The Chinese government doesn’t publish a list of... Read More .


Not all hidden services have to be websites. You could create an SSH server How to Tunnel Web Traffic with SSH Secure Shell Read More , IRC server The Top 7 Best Free IRC Clients for Windows 7 For most of us, chatrooms might seem like a relic of the past, but they're still around. If you're interested in that sort of thing, you’ll want to look into the IRC protocol. For those... Read More , or any other type of server and offer it as a hidden service on Tor. This tutorial will focus on setting up a hidden Tor site using the Savant web server – which Tor recommends – on Windows. The steps can also be applied to other operating systems and web servers.

Step 1: Install Tor

To get started, you’ll have to download and install Tor on your computer. If you already have it installed, you can skip this step. By default, Tor installs the Tor browser bundle 4 Free Anonymous Web Browsers That Are Completely Private Anonymous browsing of the web is one way to protect your online privacy. Here are the best anonymous web browsers to use. Read More , which includes a specially configured Firefox browser.

hidden tor sites

You’ll see a green onion icon in your system tray when you’re connected to the Tor network.

tor web sites


Once it’s installed, you can check out an example hidden service by plugging duskgytldkxiuqc6.onion into your Tor web browser’s address bar.

tor web sites

Tor must always be running on your system for the hidden service to be accessible. If your computer is off, disconnected from the Internet, or if Tor isn’t running, the hidden service Tor side won’t be accessible. This does have some anonymity implications – it’s theoretically possible to infer whether or not your computer is running the hidden service by seeing whether it’s accessible when your computer is off.

Step 2: Install & Configure A Web Server

You’ll need a web server to serve the hidden service site from your system. Tor’s official documentation recommends against using the common Apache web server How To Set Up An Apache Web Server In 3 Easy Steps Whatever the reason is, you may at some point want to get a web server going. Whether you want to give yourself remote access to certain pages or services, you want to get a community... Read More . Instead, Tor recommends using the Savant web server on Windows or the thttpd Web server on Mac OS X, Linux and other UNIX-like operating systems. Tor’s documentation notes that Apache “[is] big and has lots of places where it might reveal your IP address or other identifying information, for example in 404 pages” but also notes that “Savant probably has these problems too“.


The takeaway is that web server configuration is very important. If you’re running a very sensitive hidden Tor site, you’ll want to go through your web server’s settings and ensure it isn’t leaking any information that could be used to identify you, such as your IP address.

We’ll use Savant as an example here, but you can set the same options in other web servers. To configure Savant, launch its main window and click the Configuration button.

tor web sites

From the configuration window, you’ll need to set the “Server DNS Entry” box to “localhost” to bind Savant to localhost. This ensures your website is only accessible from your local computer, so people can’t access it over the normal Web and see you’re hosting the hidden service Tor site.


You’ll also have to note the port number you’re using.

tor sites

After the web server is configured, you’ll want to add your content. By default, Savant uses the C:\Savant\Root directory (you can change this from the Paths tab). Ensure you replace the index.html file in this directory with the file you want as your homepage.

tor sites


You can verify it works by typing localhost into your main browser’s address bar. If you set a different port instead of 80 – say, port 1000 – type localhost:1000 instead.

tor sites

Step 3: Configure The Hidden Service

Now that Tor’s installed and a web server is running, all you have to do is tell Tor about it. You should be able to add this information to the torrc file through the Vidalia graphical user interface, but I experienced errors and had to do this by hand.

First, shut down Tor if it’s running.

tor web sites

Next, locate your torrc file. If you installed the Tor Browser Bundle, you’ll find it in the Tor Browser\Data\Tor directory. Open this file with Notepad or another text editor.

tor web sites

Add the following section to the end of the file:

# Hidden Service
HiddenServiceDir C:\Users\Name\tor_service
HiddenServicePort 80

Replace C:\Users\Name\tor_service with the path to a directory Tor can read and write to on your system. Do not use the directory that already contains your website. This should be an empty directory.

Replace the :80 with the port the web server is using on your system. For example, if the web server is running on port 5000, you’d use the line HiddenServicePort 80

tor web sites

Save the file after editing it. You’ll also have to create the directory you specified, if it doesn’t already exist.


Restart Tor after you do this. Once you have, you’ll want to check the Message Log to see if there are any error messages.


If the Message log is free of errors, you’re good to go. Check out the hidden service directory you created. Tor will have created two files in the directory – hostname and private_key. Don’t give anyone the private_key file or they’ll be able to impersonate your hidden service Tor site.


You’ll want to open the hostname file in Notepad or another text editor. It will tell you the address of your new hidden service Tor site. Plug this address into your Tor web browser and you’ll see your website. Give the address to others so they can access your site. Remember, people must be using Tor to access your hidden service site.

hidden tor sites

Before you go, read our Tor browser safety tips 7 Tips for Using the Tor Browser Safely Thinking about trying the Tor browser to start browsing the web safely? Learn these Tor browser dos and don'ts before you start. Read More  and learn how to set up and use Tor on Android A Guide to Using Tor on Android: Apps, Privacy, and More What's the best way to use Tor on Android? We look at the official Tor Browser that helps protect your privacy. Read More .

Image Credit: Blurred Silhouette via Shutterstock

Related topics: Online Privacy, Tor Network, Web Server.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Caitlin
    May 8, 2019 at 6:30 pm

    Very descriptive article, I liked that a lot. Will there be a part 2?best free iceland porn ban images videos

  2. hc
    November 1, 2017 at 6:16 am

    how to set 2 tor service?in ur pc or Ubuntu system thank u

  3. Trevor
    September 2, 2017 at 12:44 pm

    "You’ll want to open the hostname file in Notepad or another text editor. It will tell you the address of your new hidden service Tor site. Plug this address into your Tor web browser and you’ll see your website."
    This last stage doesn't work for me.My Tor browser keeps giving me a negative response - unable to connect, etc, etc. What can I do ? I'm sure I followed all the above instructions to the letter(if I type localhost/index. then I get my page on any browser).

    Cheers, Trevor

    • Elliot
      January 6, 2018 at 12:37 am

      Same thing. I keep getting unable to connect.

  4. R
    April 1, 2017 at 6:35 am

    does this not work anymore with port? Getting a notice that
    Rejecting SOCKS request for anonymous connection to private address

    when trying to connect to the hidden service that I set up

  5. Connor Young
    September 29, 2016 at 2:39 am

    Do i need a portforward for this?

  6. regi
    September 6, 2016 at 3:36 pm

    The only problem is that to access onion sites you need special software which many users will never installed. If you need to host something grey on public internet try to use bulletproof hosting and domains. One of providers of those -

  7. Schmidtey McQueen
    April 1, 2016 at 3:23 pm

    Okay so I was able to set up the html and basic site info for this, and I am receiving an .onion link, but said link is not functioning in the Tor browser. Did I miss something?

  8. Anonymous
    August 29, 2015 at 3:02 am

    This tutorial is missing basic info. How exactly do I configure the path in savant\root? I type in localhost in my browser and It cannot find the page. index.html will not show. you do not even tell us we are supposed to use index.html or our website name to open the webpage. this is a bullshit tutorial. find a better one if you have no knowledge on how to use Savant.

    (Comment edited for expletives)

    • io
      August 8, 2016 at 11:27 am

      "After the web server is configured, you’ll want to add your content. By default, Savant uses the C:\Savant\Root directory (you can change this from the Paths tab). Ensure you replace the index.html file in this directory with the file you want as your homepage."

      I don't know about you, but to me this seems super clean. Maybe try rereading that paragraph a couple of times.

    • 01001110
      August 20, 2016 at 3:31 am

      Harvey Chris, if you are unable to navigate the simplistic route of creating a website, then that is essentially your very own fault. This tutorial is, in my opinion, a bit of an overkill, as much of this information is what one should already know. My observation of your comment simply tells me that you are uneducated, and you are lacking any sort of formal degree, training, and/or certifications, of which pertain to computer science. Please, don't become irritated at an author for not explaining the simple steps one would take to create a site. You're only making yourself appear to be that of an idiot when you post your woes on the comment section of a tutorial for all to see. Thanks for helping us I.T. professionals realize that there are absolute dimwits out there, whom are willing to inadvertently risk the equivalent of PC AIDS by browsing the Deep Web. LMAO

  9. Ivan
    May 11, 2015 at 4:34 pm

    So, does this hide me from the authorities too or can I be traced to my house address for anything I may host?

    • 01001110
      August 20, 2016 at 3:36 am

      Ivan, the fact that your IP is available for all to see on this site, and that you are likely using the very same IP, i.e. not using a VPN, Proxy Jumper, and other resources, then the answer to your question is no. The fact that you wish to maintain an illegal stance when using the Deep Web only makes one assume that your intentions are to browse the sites for illegal pornography, and not for the fun cracking/hacking sites made available to us by an array of cryptographers out there. Good luck keeping a minimal sense of anonymity whilst using the Deep Web, unless you're browsing for illegal pornography, or using the Deep Web for other illegal actions; because if that it the case, I do hope your ISP willingly transmits your traffic data to the proper authorities.

      • Ivan
        August 20, 2016 at 4:15 pm

        No, I want to host government documents/wikileaks

        i didn't use a proxy for this site but how can you as a reader see my IP address?

        > using the Deep Web for other illegal actions
        Pretty sure your hacking and cracking is illegal ?

  10. lianasah
    February 9, 2015 at 6:35 am

    i have made a test site can any one try to acces it if it working for outside my network

    • MI5
      February 2, 2016 at 7:16 pm

      Can't access it, try doing the steps again.

  11. RedRedMane
    January 5, 2015 at 2:59 am

    I mean,.. it is year "2015" for Christ sake!

    • Straukszolv
      February 17, 2015 at 5:48 pm

      "..SO MUCH has happened to the Dark web since this info page was written." like What ?? links?

    • towel
      November 24, 2015 at 5:38 am

      Care to elaborate on exactly what has changed?

  12. RedRedMane
    January 5, 2015 at 2:57 am

    Man, this is one VERY old and obsolete web page. SO MUCH has happened to the Dark web since this info page was written.

  13. Rob Kent
    September 28, 2012 at 12:36 am

    Try instead of localhost enter in server dns entry.worked for me nowi can access my webserver from my home computer

    • Rob Kent
      September 28, 2012 at 12:41 am

      Ive set up a tor test site s2hjvesx2elcubjf.onion

    • Rob Kent
      September 28, 2012 at 12:42 am

      id love some to see if they ann connect

  14. Student
    September 18, 2012 at 9:29 pm

    I've run hidden services for a few years, but have always had a problem with reliability which is apart from the reliability of the hardware or network. It seems to have something to do with inactivity, where if I haven't used my hidden service (website) in a while it may take several minutes for it to respond, but sometimes it stops responding even when recently active. These problems do not happen when the website is accessed locally or through the normal external web interface. Recently I installed a second website as a second hidden service on the same computer using the same apache. Since then I have found that the newer service is much more reliable than the older one, despite equivalent configuration. The most frustrating part of this is that I don't know of any troubleshooting tools or documentation which could explain why a hidden service link would apparently deteriorate in reliability with age. Have you any insight?

    • Student
      September 19, 2012 at 2:09 pm

      Since yesterday I tried connecting to the old hidden service from another computer and it worked, even while it failed to connect to the first computer. The Tor browser versions are slightly different, 2.2.38-2 vs. 2.2.39-1. I also noticed some warnings in the tor log on the server about not being able to advertize all ciphers due to Tor not being up to date, yet the Ubuntu Lucid on that machine was up to date. So I am upgrading that server to Precise. If that doesn't fix the problem (which has been going on at least two years), I might try moving to the development branch for Tor.

      • Student
        September 20, 2012 at 5:16 pm

        The upgrade went smoothly and the service seems to work OK for now. One problem I had after the upgrade was that my private key directory (hidden_service) was unreadable to tor even though its permissions and ownership were correct, apparently because I had relocated it to a home directory. Relaxing permissions on the parent directories had no effect. Moving it to the default location, /var/lib/tor, fixed the permission problem but would allow anyone in possession of the server to emulate the hidden service because the home directory was encrypted but /var isn't. At least this got me thinking that some sort of intermittent permission or apparmor problem may explain the erratic service.

        If there are any forums to discuss problems like this I would love to know. The torproject site itself says it plans such a forum, but I can't believe this system has no community forum even though I can't find it. I get the impression that searches are censored. I might think this were overly paranoid if I had not encountered clear cut dropping of emails containing the link.

  15. Chan
    August 25, 2012 at 1:29 pm

    If you are using Windows Vista or 7, this could be your inherrent problem for the tor site. I installed everything exactly the same on Win 7 with WAMP, and it had external connection problems. When I did the EXACT same thin on Win XP Pro, NO PROBLEMS! Seems older technology works better sometimes.

    • Chris Hoffman
      August 27, 2012 at 10:11 pm

      Weird. Maybe Windows 7's firewall settings were interfering?

  16. Pavoski
    August 11, 2012 at 5:17 pm

    I am so frustated, i did everything correctly and i can connect to my hidden service while in tor browser, i type localhost in chrome it works,but when i type local host in tor browser or put my onion link i got it says unable to connect to server ugh.

    • Chris Hoffman
      August 13, 2012 at 11:57 pm

      Hmm, I'm not sure how to help -- there's not much troubleshooting info out there for Savant.

      Maybe I should've ignored Tor's recommendations and gone with Apache anyway. Sorry it's such a pain -- you can always try Apache or check out tor's official documentation for this:

  17. HI
    August 5, 2012 at 6:48 pm

    Tor is all well and good but the only problem is its speed. Do you know of any way to increase speeds of connections to sites inside the network?

    • Chris Hoffman
      August 7, 2012 at 7:24 am

      No, I don't think so. The slow speed is just a consequence of Tor's architecture. You're not connecting directly, you're connecting through a variety of middlemen and taking the scenic route.

      • The same person
        August 9, 2012 at 3:34 pm

        Ah, that makes more sense to me now. Thanks for clearing that up!

  18. j
    July 22, 2012 at 3:38 pm

    hey, i've follow your tutorial and it works great but when i tried to access my website i get an error that say firefox can't establish a connection. any thought.

    • Chris Hoffman
      July 24, 2012 at 3:06 am

      I'm honestly not sure. Tor recommends the Savant web server, but there isn't as much documentation about it as Apache...

  19. Jonty
    April 21, 2012 at 3:23 am

    Its working........Now I have to test from other newwork

    • woongah
      June 4, 2012 at 9:02 am

      A rather odd way you can use it is to relay to the extern a web interface, for some application that does provides it (such as TightVnc, among the others), from behind a dynamic ip connection, without having to bother too much with DynDNS and others the like, and to take yourself the hassle of setting up the ssh tunneling needed to make it secure (the connection never leaves the TOR network, which means that it the main weak point of the TOR architecture, the exit point, is eliminated and all that rest are a bunch of scarsely traceable ssl tunnelings).

      It is quite a forceful way to misuse this technology, as it is most surely not what it was designed for, but one perfectly legit.

      Even in the most democratic of the possible worlds, where one had absolutely no reason to suspect malfeasance on ppart of his government.

      • Chris Hoffman
        June 8, 2012 at 12:40 am

        That's an interesting use. Still, you shouldn't really abuse it - Tor isn't for BitTorrent and other high-bandwidth things. If you're running heavy server software, I wouldn't do it through Tor -- it'd be on the slow side, anyway.

  20. Skalli
    April 14, 2012 at 12:03 pm

    Hi and thanks for the interesting article.
    I have a question: If I enter the the onion-link (for example a1b2c3.onion), it should refer me to a1b2c3.onion/index.html, right? What happens is, that it tries to refer me to localhost:/index.html, which gives a document not found error. Is there any way to fix the redirect error? When I enter a1b2c3.onion/index.html it works fine.


    • Chris Hoffman
      April 16, 2012 at 1:04 am

      That's odd, I'm not sure -- I followed Tor's recommendation to use Savant, and the instructions here jive with both project's official documentation at and

      • Skalli
        April 17, 2012 at 8:23 pm

        I've read those links to, that made me look for Savant. But with this trouble it's pretty useless though. I was just fidling around anyways, but it's always interesting to learn and try new stuff. ;)
        Thanks anyways! :)

        • Skalli
          April 17, 2012 at 8:42 pm

          And an addition: It's not Savant, it's probalby Tor. I tried it with nginx: Same result.
          Send the link to a friend: It works... :)
          Looks like I'm forwarded to localhost, I'm running the webserver on another machine, but in the same network,maybe that's why this is happening.

        • Chris Hoffman
          April 20, 2012 at 3:28 am

          Thanks for sharing your experience! It seems to work for external users, which is what really matters.

        • merch
          May 18, 2012 at 5:00 pm

          Dear Chris thank you for lovely tutorial, i did exactly like you describe with savant, but i can access the onion site only on my computer, i cant access it from other computer or friends computer, what am i doing wrong??

        • Chris Hoffman
          May 22, 2012 at 1:16 am

          I'm not entirely sure, to be honest. It worked for me and it seemed to work for others here -- I'm no expert on Savant, I just recommended it here because Tor themselves recommend it.

          Does anyone else have any tips?

        • Michael
          September 5, 2012 at 2:42 pm

          Merch, have you forwarded the correct port on your router?

  21. Z.B. Manfred
    April 6, 2012 at 3:24 am

    I'm guessing you'll need a web server and a dedicated connection for this? The home-brew dial-up sites of old are, well, too old nowadays...

    • Chris Hoffman
      April 16, 2012 at 1:02 am

      You could use this method to host a site on your desktop machine, but obviously a web server and dedicated connection are helpful for other reasons (24/7 uptime being one of them)

  22. bemused
    April 3, 2012 at 2:45 pm

    I honestly can not think of one legal/morally/ethically correct reason why a person would need this?

    • realist
      April 3, 2012 at 4:02 pm

      Then you aren't thinking hard enough.

    • dustinc
      April 3, 2012 at 8:22 pm

      There are plenty. Web based chat or instant message service using xmpp or similar protocool's for one. Remember, you don't have to have something to hide to be anonymous.

      • Chris Hoffman
        April 5, 2012 at 4:06 am

        Yup, XMPP, IRC, an FTP server -- any type of server or service.

        And you don't have to have something to hide to want privacy, exactly. I wouldn't want a camera in my bathroom or bedroom.

    • Chris Hoffman
      April 5, 2012 at 4:05 am

      Hi bemused, I put an ethically correct reason in the article: journalists and activists in repressive countries.

      Or whistleblowers fearing reprisals.

      And yes, activists in repressive countries may be breaking that country's laws -- that's the point.

      • Kike Kikeman
        September 20, 2012 at 6:05 am

        The only repressed country I know of is Israel. Why didn't you include that in your article you two-faced kike.

  23. Ivan
    April 3, 2012 at 10:49 am

    cool !

    • Chris Hoffman
      April 5, 2012 at 4:06 am

      It really is. I actually had no idea Tor could do this until recently! It ought to be more publicized.

      • Melanie
        April 9, 2012 at 10:43 pm

        LOL but then .... it wouldn't be a 'secret' anymore ;)

        • anonymous
          June 30, 2012 at 10:38 am

          Secret and anonymous are two different things.