0

How is it that I can host multiple (static) hidden services on one server? I am just needing 3 simple and static HTML sites with their own .onion? If I add multiple HiddenServiceDir do they have to be on different ports or can they be on the same? There will not be a large amount of traffic going to the hidden services.

1
  • Yes you can host multiple hidden services with multiple HiddenServiceDir and HiddenServicePort lines. They can run either on the same port or different ports depending on how you have your web server set up. For example: tor.stackexchange.com/questions/12324/…
    – Steve
    May 11, 2021 at 2:47

1 Answer 1

0

Yes, you can host multiple hidden services on the same server. Your torrc file should have this content added for each site -:

HiddenServiceDir /var/lib/tor/hidden_service1
HiddenServicePort 80 127.0.0.1:80

HiddenServiceDir /var/lib/tor/hidden_service2
HiddenServicePort 80 127.0.0.1:80

In case of ubuntu or debian if you are using apache2 add the following lines to your /etc/apache2/site-available/00-default.conf file -:

<VirtualHost *:80>
    ServerName yourhiddenservice1domain.onion
    DocumentRoot /var/www/html/firstsite
</VirtualHost>

<VirtualHost *:80>
    ServerName yourhiddenservice2domain.onion
    DocumentRoot /var/www/html/secondsite
</VirtualHost>

And you are done!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.