ngrok is a service to publicize your local server application from Windows/MAC/Linux to a Global area, and we can start it for free! In this tutorial I will show you how to set up and play with it.
Update your raspberry
use this command to update your raspberry.
$ sudo apt-get update $ sudo apt-get upgrade |
ngrok
Creat Account
Enter this link and create a ngrok account.
Because I am a lazy guy, I will login with google 😉
Finished.
Your Authtoken
Now you need to find your Authtoken Key.
Go to Getting Started>Your Authtoken.
Copy your key and saved in some where.
Setup in Raspberry pi
The next step is to set up your Raspberry pi.
Click the Getting Started>Setup & Installation.
Choose Linux(ARM) and download it.
Copy and unizp
Use this command to unzip your installation packages.
tar zxvf ngrok-v3-stable-linux-arm.tgz ngrok |
Move
move the packages to /usr/local/bin directory.
sudo mv ngrok /usr/local/bin |
Version check
Finally please check the ngrok version.
ngrok version ngrok version 3.0.3 |
Test with apache
We can install the apache to test the feature.
sudo apt-get install apache2 |
Run it
Enter this command to Run your ngrok application.
ngrok http 80 |
このような画面が見えます。
The screen is shown.Please copy the Forwarding Link to your browser.
Local OK
Let’s check the Local environment first.
127.0.0.1 is ok.
But in public..
But an error is shown while we try to access the Forwarding Link.
Connect your api key
It is because we forgot to install the API Key in your system.
Please use this command to install your API Key.
ngrok config add-authtoken yourAPIKey |
Done!