How to install Ngrok on Linux?

First published: Saturday, March 16, 2024 | Last updated: Saturday, March 16, 2024

Learn the detailed step-by-step process to install Ngrok on your Linux operating system. This will allow you to create an HTTP/TCP tunnel for secure and efficient communication.


What is Ngrok?

Ngrok provides quick and secure access to your applications from any cloud, private network, or device. It offers authentication, load balancing, and other important features to ensure the security and performance of your applications. Ngrok is an efficient solution for quickly exposing your app to the internet and testing it against your development backend.

Install Ngrok

When installing Ngrok on a Linux-based operating system, the most advisable approach is to download the executable binary and then extract it. This method is considered the best practice irrespective of the specific Linux distribution in use. Upon completing the installation, it is crucial to validate the Ngrok version to ensure a successful installation. It’s important to note that Ngrok is merely an executable binary, so it’s essential to verify the installed version to confirm the success of the installation process. For comprehensive instructions, I highly recommend consulting the Ngrok documentation.

# Download Ngrok.
$ wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz -P /tmp

# Extract Ngrok from archive.
$ tar xvzf /tmp/ngrok-v3-stable-linux-amd64.tgz -C /tmp
 
# Install Ngrok.
$ sudo mv /tmp/ngrok /usr/local/bin

# Check Ngrok version.
$ ngrok --version