Demo a website running on your local machine to a client or stakeholder without deploying to a staging site.
To begin using Ngrok, follow these simple steps:
-
Sign Up:
Sign up for Ngrok to obtain your authentication token. Ensure you store it securely for future use.
-
Grab Your Static Domain:
Claim your unique static domain from Ngrok.
Install Ngrok via Apt using the following command:
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc \
| sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" \
| sudo tee /etc/apt/sources.list.d/ngrok.list && sudo apt update && sudo apt install ngrok
Once installed, add your authentication token:
ngrok config add-authtoken <your-authtoken>
To put your application online, assuming it's listening on port 8080, execute the following command:
ngrok http --domain=<your-static-domain> 8080
You'll receive a URL similar to this:
Forwarding https://<your-static-domain> http://localhost:8080
Put your app online , assuming it's listening on port 8080 ( you may run into problems )
docker run -it -e NGROK_AUTHTOKEN=<your-authtoken> ngrok/ngrok:latest http --domain=<your-static-domain> 8080
Enjoy the benefits of Ngrok