If it doesn't work, look in your logs for some hints, and keep playing with it until it works. Now you can connect to your Onion Service using Tor Browser, and you should get the html page you setup back in Step 1. If your keys leak, other people can impersonate your Onion Service, deeming it compromised, useless, and dangerous to visit. The other files are your Onion Service keys, so it is imperative that these are kept private. The hostname file in your Onion Service configuration directory contains the hostname for your new onion v3 service. Now to get your Onion Service address, go to your HiddenServiceDir directory, and find a file named hostname. Step 4: Test that your Onion Service works When Tor starts, it will automatically create the HiddenServiceDir that you specified (if necessary). Typically, there are typos in the torrc or wrong directory permissions (See the logging FAQ entry if you don't know how to enable or find your log file.) That should give you an idea of what went wrong. It will print some warnings or error messages. Step 3: Restart Tor and check that it worked HiddenServicePort 80 unix:/var/run/tor-my-website.sock You will need to add the following two lines to your torrc file: HiddenServiceDir /var/lib/tor/my-website/ Tip: A good practice to avoid leaking an Onion Service to a local network is to run Onion Services over Unix sockets instead of a TCP socket. The HiddenServicePort line specifies a virtual port (that is, the port that people visiting your Onion Service will be using), and in the above case it says that any traffic incoming to port 80 of your Onion Service should be redirected to 127.0.0.1:80 (which is where the web server from step 1 is listening). You will want to change the HiddenServiceDir line, so that it points to an actual directory that is readable/writeable by the user that will be running Tor. The HiddenServiceDir line specifies the directory which should contain information and cryptographic keys for your Onion Service. You will need to add the following two lines to your torrc file: HiddenServiceDir /var/lib/tor/my_website/ The next step is opening the config file of Tor (torrc) and doing the appropriate configurations to setup an Onion Service.ĭepending on your operating system and setup, your Tor configuration file can be at a different location or look different. Once your web server is set up, make sure it works: open your browser and go to Then try putting a file in the main html directory, and make sure it shows up when you access the site. If you get an error message, something has gone wrong and you cannot continue until you've figured out why this didn't work. Nginx is available in the main repository of multiple Linux and *BSD distributions.īy default, the web server will be running on localhost:80 at the end of the installation. ApacheĪpache is available in the main repository of multiple Linux and *BSD distributions. On this page, the commands to manage the web server are based on Debian-like operating systems and may differ from other systems.Ĭheck your web server and operating system documentation. We recommend you install a new separate web server for your Onion Service, since even if you already have one installed, you may be using it (or want to use it later) for a regular website. ![]() If you get stuck or want to do more, find a friend who can help you or join our tor-onions mailing list to speak with other operators.Īs an example, we will cover how to set up an onionsite with Nginx and Apache on Debian. Step 1: Get a web server workingĪs a first step, you should set up a web server locally, like Nginx, Apache, or your favorite web server. ![]() You should also know where Tor's configuration files are. Tor should be up and running correctly for this guide to work. To set up Tor, please follow the Tor installation guide. Step 0: Get a working TorĪs part of this guide, we will assume you have a functional Tor in your machine. This guide shows you how to set up an Onion Service for your website.įor the technical details of how the Onion Service protocol works, see our Onion Service protocol page.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |