Tor-Hidden-Service
Note: Tor is ending its support for version 2 (v2) Onion Services, and v2 onion sites have since been deprecated. Please refer to tor v3
Tor-Onion-Service-On-Heroku.
- 1 .
ruby
- 2 .
tor
v2 - 3 .
php
- 4 .
git
- 5 .
heroku CLI
- 1 . Create an account on https://heroku.com.
- 2 . Install the Heroku CLI on your computer:
https://devcenter.heroku.com/articles/heroku-cli.
Check that you have theheroku-cli
installed by checking the version number in your terminal:
heroku --version
- 3 . Connect the
Heroku CLI
to your account by writing the following command in your terminal and follow the instructions on the command line:
heroku login
-
1 . After installing
Heroku CLI
clone this reposiRubyy. -
2 . Clone the repo with below command
git clone https://github.com/sumithemmadi/Ruby-Hidden-Service.git
cd Ruby-Hidden-Service
- 3 . Create a heroku application
heroku apps:create App-Name
-
heroku apps:create App-Name
this command creates the application as well as a git remote, that you can use to push your code to Heroku: -
Note: replace
App-Name
with any other name.
$ heroku apps:create ruby-hidden-service
Creating ⬢ ruby-hidden-service... done
https://ruby-hidden-service.herokuapp.com/ | https://git.heroku.com/ruby-hidden-service.git
- 4 . Now enter the below command
heroku buildpacks:set https://github.com/heroku/heroku-buildpack-multi.git
-
Add this buildpack to heroku.
-
5 . Copy your website
index.html
file to the folderviews
asindex.erb
-
6 . Copy SHA from private_key which is located at
/var/lib/tor/hidden_service/
hostname
private_key
If you don't know where these files stored refer to https://2019.www.torproject.org/docs/tor-onion-service
-
7 . Tor hidden services require a private_key and it's SHA to generate .onion name. You'll need to provide this as env vars.You can also edit config vars from your app’s Settings tab in the Heroku Dashboard:
-
8 . Deploy your changes to heroku
git add .
git commit -am "Ruby hidden service"
git push heroku
- Now your app is accessible over Tor
- To know your .onion address
- Run the below command on terminal
cat /var/lib/tor/hidden_service/hostname
-
Tor is ending its support for version 2 (v2) Onion Services. Please refer to
tor v3
-
GitHub Repo for
Tor onion service v3
:https://github.com/sumithemmadi/Tor-Onion-Service-On-Heroku.