Tor Hidden Service Buildpack for Heroku
This buildpack sets up a Tor hidden service for your app on Heroku.
- Create a Heroku app as normal, with any buildpacks you typically use.
- Create the directory -> 'hidden_service' in the root of your build repo.
- Then:
$ heroku buildpacks:add https://github.com/quantumalchemy/heroku-tor.git
With the buildpack installed, you'll need to modify your Procfile such that the hidden service will be setup when the app runs.
web: ./tor/bin/run_tor <cmd you'd normally run>
While web
works just fine, so too will any other process type. Use web
if you want the app to be accessible generally, as well as over Tor. Use
<any other type>
(e.g. foo
), to avoid Heroku's router routing to your app like so:
foo: PORT=9999 ./tor/bin/run_tor <cmd you'd normally run>
Your app will only be accessible over Tor, through your configured
.onion
address.
Setup:
Tor hidden services require that you provide the hs_ed25519_secret_key v3 for the .onion url (hostname).
-
Copy ONLY the: hs_ed25519_secret_key file from '/app/hidden_service/' in the running dyno after first deployment to -> 'hidden_service' that you just created in your -> git build repo
-
You'll need to provide env vars:
HIDDEN_DOT_ONION
: from the hostname file under the running dyno 'hidden_service'
- After commited changes - re deploy .. and Enjoy!
- Verifies tor integrity
- Caches compilation
- Updated to work for Tor persistent v3 urls!