Skip to content

Instantly share code, notes, and snippets.

@ubergesundheit
Created November 6, 2017 13:19
Show Gist options
  • Save ubergesundheit/7bdb6bdc818028a34a190363aed4d00a to your computer and use it in GitHub Desktop.
Save ubergesundheit/7bdb6bdc818028a34a190363aed4d00a to your computer and use it in GitHub Desktop.
ngrok on raspberrypi on systemd
  • Download ngrok binary
  • Create /etc/systemd/system/ngrok.service
  • Create /opt/ngrok/ngrok.yml
[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=/opt/ngrok/ngrok start -config /opt/ngrok/ngrok.yml --all
ExecStop=/usr/bin/killall ngrok
[Install]
WantedBy=multi-user.target
authtoken: YOUR-AUTH-TOKEN
json_resolver_url: ""
dns_resolver_ips: []
console_ui: false
log_format: logfmt
log: /opt/ngrok/ngrok.log
region: eu
web_addr: false
tunnels:
ssh:
proto: tcp
addr: 22
inspect: false
@ricardojlrufino
Copy link

sudo systemctl enable ngrok
sudo systemctl start ngrok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment