- Install ngrok v3+ using apt/snap as on ngrok's download page.
- Authenticate ngrok as per ngrok's getting started page. Add the
ssh
tunnel to ngrok's config file. Default location is: ~/.config/ngrok/ngrok.yml
.
- (Alternate to step 2) Copy the
ngrok.yml
config file in this repo to ~/.config/ngrok/
and replace the authtoken in file with own.
- Find the location of the
ngrok
executable using whereis ngrok
and edit the ExecStart
parameter in the ngrok.service
file accordingly.
- Run the manual install script:
sudo manual_install.sh
(or execute commands therein yourself). It copies the service file to the right location and enables the ngrok service using systemctl.
- Check the executable logs with
sudo journalctl -u ngrok.service
.
- Clone this repository to the target machine (eg: Raspberry Pi)
- Get your
authtoken
from ngrok website
- Inspect and modify the configuration file
ngrok.yml
, by default this config will use Asia Pacific region to serve both HTTP and TCP tunnels
- Run
sudo ./install.sh <your_authtoken>
, replace <your_authtoken>
with the token you've obtained before from ngrok website.
- You're good to go!
Fork of: https://github.com/vincenthsu/systemd-ngrok