lnbits-legend/lnbits/extensions/ngrok
2021-07-03 09:05:48 -04:00
..
.gitkeep Create .gitkeep 2021-07-03 08:59:17 -04:00
__init__.py Add files via upload 2021-07-03 09:05:48 -04:00
config.json Add files via upload 2021-07-03 09:05:48 -04:00
LICENSE Add files via upload 2021-07-03 09:05:48 -04:00
migrations.py Add files via upload 2021-07-03 09:05:48 -04:00
models.py Add files via upload 2021-07-03 09:05:48 -04:00
README.md Add files via upload 2021-07-03 09:05:48 -04:00
views.py Add files via upload 2021-07-03 09:05:48 -04:00
views_api.py Add files via upload 2021-07-03 09:05:48 -04:00

Free Tunnel

Serve lnbits over https for free using ngrok

How it works

When enabled, Free Tunnel creates a tunnel to ngrok with https support and tells you the https web address where you can access your lnbits instance. If you are not the first user to enable it, it doesn't create a new one, it just tells you the existing one. Useful for creating/managing/using lnurls, which must be served either via https or via tor. Note that if you restart your device, your device will generate a new url. If anyone is using your old one for wallets, lnurls, etc., whatever they are doing will stop working.

Installation

Check the Extensions page on your instance of lnbits. If you have copy of lnbits with Free Tunnel as one of the built in extensions, click Enable -- that's the only thing you need to do to install it.

If your copy of lnbits does not have Free Tunnel as one of the built in extensions, stop lnbits, create go into your lnbits folder, and run this command: ./venv/bin/pip install pyngrok. Then go into the lnbits subdirectory and the extensions subdirectory within that. (So lnbits > lnbits > extensions.) Create a new subdirectory in there called freetunnel, download this repository as a zip file, and unzip it in the freetunnel directory. If your unzipper creates a new "freetunnel" subdirectory, take everything out of there and put it in the freetunnel directory you created. Then go back to the top level lnbits directory and run these commands:

./venv/bin/quart assets
./venv/bin/quart migrate
./venv/bin/hypercorn -k trio --bind 0.0.0.0:5000 'lnbits.app:create_app()'