vincenthsu / systemd-ngrok

Automatically start ngrok by systemd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install.sh for Raspberry PI

DavidePiff opened this issue · comments

Hi,
This is not a real issues. it's an issue with a solution.
I followed the instructions to manually install systemd-ngrok on my raspberry PI 3, but I had some problems.
It's easier to run the install.sh, but it's for Linux X64.
I edited the install.sh to make it work on a raspberry and attached you find the zip archive that includes 2 files:

  • install_RPi3.sh : it's the install file to install systemd-ngrok on a Raspberry Pi 3.

  • ngrok.yml: the ngrok.yml file to support the free version of ngrok for a simple http tunneling with the region setting turned on (EU in my case).

It works on Raspbian Buster Lite: I make it available to be tested by other RPi users.
I suspect that it works on other RPi versions: I don't see a reason why it should not.

Instructions for RPi:
Download the zip file and extract the files.
chmod +x install_RPi3.sh
Run:
sudo ./install_RPi3.sh <your-auth-key>
edit the "ngrok.yml" for your needs - https://ngrok.com/docs .
sudo nano /opt/ngrok/ngrok.yml
Ctrl+O to save the file, Ctrl+X to quit Nano.

--optional
Overwrite the ngrok.yml file in /opt/ngrok/ with that one in the zip archive for a simple http tunnel on port 80. SSH is not exposed.

Job done.
Ciao
Davide

Install_RPi3.zip

It looks good, and here are some code snippets need to be automatic:

sudo nano /opt/ngrok/ngrok.yml

I think it can use sed and echo commands to complete this ngrok.yml file without executing nano command.

Could we pass one more parameter to install.sh beside authtoken?

ie:

# for raspberry pi 64 bit
./install your_token_string arm64

# for any architecture
./install your_token_string architecture_alias

image

Very cool