Home » guide » How to create a .onion service

How to create a .onion service

For a .onion server you will need to have a linux server, in this example we will use Ubuntu (u can use the same server we setup to generate the address, or use a third party such as AWS, Azure or Alibaba Cloud)

Installing the Services

  1. install TOR using APT
    > sudo apt install tor
  2. Confirm that Tor is up and running on port 9050 by using the ss command
    > ss -nlt
  3. check to see if you are using the latest TOR version
    > tor –version

  4. check to see if you are using TOR
    this will show your public IP
    > wget -qO – https://api.ipify.org; echo

    this will show your TOR IP
    > torsocks wget -qO – https://api.ipify.org; echo

Setting up the Server

  1. Edit the torrc file (config file for tor services)
    > vi /etc/tor/torrc
  2. scroll down the page using the arrow keys on the keyboard until you find the lines:
    #HiddenServiceDir /var/lib/tor/hidden_service/
    #HiddenServicePort 80 127.0.0.1:80
  3. uncomment (remove the #) from the 2 lines so it looks like below
    HiddenServiceDir /var/lib/tor/hidden_service/
    HiddenServicePort 80 127.0.0.1:80

  4. Save the config by pressing the “Esc” key and typing :wq (write, quit) and hit the “Enter” key
    > :wq
  5. restart the service
    > sudo service tor restart