Last active
August 2, 2021 14:38
-
-
Save apfelchips/823c462a17ad1292c4179d0c4ca94017 to your computer and use it in GitHub Desktop.
autostart ngrok with systemd - put binary and ngrok.yml into /opt/ngrok/
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
# put me in: /etc/systemd/system/ | |
# ngrok binary: https://ngrok.com/download | |
# sudo chmod +x /opt/ngrok/ngrok | |
[Unit] | |
Description=ngrok | |
After=network.target | |
[Service] | |
ExecStart=/opt/ngrok/ngrok start --all --config /opt/ngrok/ngrok.yml | |
ExecReload=/bin/kill -HUP $MAINPID | |
KillMode=process | |
IgnoreSIGPIPE=true | |
Restart=always | |
RestartSec=3 | |
Type=simple | |
User=daemon | |
Group=daemon | |
[Install] | |
WantedBy=multi-user.target |
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
# doc: https://ngrok.com/docs#tunnel-definitions | |
authtoken: xxxx | |
region: eu | |
tunnels: | |
ssh: | |
proto: tcp | |
addr: 22 | |
# myapp-http: | |
# addr: 80 | |
# proto: http | |
# hostname: example.com | |
# auth: "user:secretpassword" | |
# bind_tls: false | |
# myapp-https: | |
# addr: 443 | |
# proto: tls | |
# hostname: example.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment