- Download and unzip ngrok to
/usr/local/bin/ngrok
- Create a configuration file in
/etc/ngrok/config.yml
- Place authtoken from ngrok website in the configuration file
- Copy ngrok.service to
/etc/systemd/system/ngrok.service
- Execute
sudo systemctl enable ngrok.service
- Execute
sudo systemctl daemon-reload
- Execute
sudo systemctl start ngrok.service
Last active
January 26, 2020 16:18
-
-
Save hector/8b1f0ff4c7f63ec22ad871ddb574dce3 to your computer and use it in GitHub Desktop.
ngrok as a service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
authtoken: YOUR_TOKEN_HERE | |
json_resolver_url: "" | |
dns_resolver_ips: [] | |
log: /var/log/ngrok.log | |
tunnels: | |
ssh: | |
proto: tcp | |
addr: 22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Share local port(s) with ngrok | |
After=syslog.target network.target | |
[Service] | |
PrivateTmp=true | |
Type=simple | |
Restart=always | |
RestartSec=1min | |
StandardOutput=null | |
StandardError=null | |
ExecStart=/usr/local/bin/ngrok start -config /etc/ngrok/config.yml --all | |
ExecStop=/usr/bin/killall ngrok | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://ngrok.com/docs/ngrok-link#service
It has not worked: this is only for ngrok-link, a special version of ngrok to target procution environment which is not downloadable.