How to Use ngrok: Easily Share Your Local Server [Step-by-Step]


How to Use ngrok to Test a Local Site

This tutorial demonstrates a way to share your localhost development server with anyone, anywhere using ngrok to create a secure tunnel to your local machine.

Demonstrating your application’s latest features to project managers or clients isn’t easy unless they’re sitting a few desks away. It may be possible to commit the changes and deploy to a public staging server, but that process can be impractical if you’re just seeking an opinion about a widget color or demonstrating the futility of their ridiculous suggestion!

Ideally, you need some way to share access to a web application currently running on your localhost development server. ngrok provides that solution.

What is ngrok?

Your development machine may be connected to a secure network behind a firewall. To work around access restrictions, ngrok runs a small client process on your machine which creates a private connection tunnel to the ngrok cloud service. Your localhost development server is mapped to an ngrok.io sub-domain, which a remote user can then access. There’s no need to expose ports, set up forwarding, or make other network changes.

The ngrok client software is available for Windows, macOS, and Linux.

Is ngrok Secure?

The connection tunnel established by ngrok is secure and can only transmit data to the localhost port you have open. It would be difficult to do any damage, but ngrok is only as secure as the application you’re testing.

In most cases, you’ll use ngrok to temporarily grant access to someone by issuing them with a randomly generated URL. It’s best to assume that anyone could access your app while the tunnel is open. You may want to disable that “delete all files” option while ngrok is active!

What Does ngrok Cost?

The basic ngrok service is free and permits up to four tunnels and 40 connections per minute. Commercial options start from $5 per month, providing further connections and custom domains.

Download ngrok

To start, open ngrok.com in your browser and click Sign up to register. A Google or GitHub account is easiest, but you can choose standard registration with an email address and password. An email verification link will be sent to you.

After login, you’ll be directed to the ngrok dashboard where you can download the client for your operating system.

ngrok dashboard

Download and extract the file, following any specific instructions for your OS. It’s then necessary to add your authentication token by running the command shown in the Connect your account section a little further down the page.

ngrok configure

./ngrok authtoken <token>

Note: Windows users will enter ./ngrok.exe.

Continue reading
How to Use ngrok: Easily Share Your Local Server [Step-by-Step]
on SitePoint.

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

How to Use ngrok: Easily Share Your Local Server [Step-by-Step]

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.