Ruby-Hidden-Service
                                
                                 Ruby-Hidden-Service copied to clipboard
                                
                                    Ruby-Hidden-Service copied to clipboard
                            
                            
                            
                        Host a website in dark web with heroku
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.
Prerequisites
- 1 . ruby
- 2 . torv2
- 3 . php
- 4 . git
- 5 . heroku CLI
Install Heroku
- 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-cliinstalled by checking the version number in your terminal:
heroku --version
- 3 . Connect the Heroku CLIto your account by writing the following command in your terminal and follow the instructions on the command line:
heroku login
Quick Start
- 
1 . After installing Heroku CLIclone 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-Namethis command creates the application as well as a git remote, that you can use to push your code to Heroku:
- 
Note: replace App-Namewith 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.htmlfile to the folderviewsasindex.erb
- 
6 . Copy SHA from private_key which is located at /var/lib/tor/hidden_service/- hostname
- private_keyIf 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
My app
- 
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.
