Host Onion services in dark web using Heroku CLI
Host Tor v3 Hidden Service in dark web using heroku
Try my another repository built with php https://github.com/sumithemmadi/tor-hidden-service-on-heroku/
nodejs
tor
- v3php
git
Heroku CLI
heroku-cli
installed by checking the version number in your terminal:heroku --version
Heroku CLI
to your account by writing the following command in your terminal and follow the instructions on the command line.heroku login
1 . Create a new project, for example in my case Project
and go to that directory.
2 . Clone this repository with below command
git clone https://github.com/sumithemmadi/Tor-Onion-Service-On-Heroku.git
cd Tor-Onion-Service-On-Heroku
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 tor-onion
Creating ⬢ tor-onion... done
https://tor-onion.herokuapp.com/ | https://git.heroku.com/tor-onion.git
4 . Now add three buildpacks heroku/nodejs
,heroku/php
and heroku-community/apt
to you application.
heroku buildpacks:set heroku/nodejs
heroku buildpacks:add --index 1 heroku-community/apt
heroku buildpacks:set heroku/php
6 . Copy your website file's to the folder site
eg :- index.html,index.php [default=index.html]
7 . Copy the following files to temp/var/lib/tor/hidden_service
dir
hostname
hs_ed25519_public_key
hs_ed25519_secret_key
If you don't know where these files stored refer to https://2019.www.torproject.org/docs/tor-onion-service
8 . Deploy your changes to heroku
git add .
git commit -am "Updated"
git push heroku
heroku run cat temp/var/lib/tor/hidden_service/hostname
If you still can't find your .onion link.
Open your heroku app https://App-Name.herokuapp.com
and click on show my .onion link
.
Note : Due to herokus policies, a single web dyno is sent to sleep after 30 minutes of inactivity. This means if your application has not served any requests for 30 minutes, it is forced to sleep by heroku and has to wake up prior to serve a new request, which easily can take up to 30–40 seconds. Generally free dynos will sleep (shut down) after 30 minutes of inactivity. This is actually a feature to avoid using up your free dyno hours. To prevent Heroku app from idling add New Relic add-on. It has an availability monitor feature that will ping your site twice per minute, thus preventing the dyno from idling (Or) add Uptimerobot it is free and offers 5 min interval site checking.
Here is my app https://tor-onion.herokuapp.com/