Skip to main content
This guide shows you how to use ngrok from a Google Colab notebook using the pyngrok library. It covers installing pyngrok, adding your ngrok authtoken, and starting a tunnel from Colab.

What you’ll need

1. Install pyngrok in your notebook

In a Colab cell, install pyngrok:

2. Add your ngrok authtoken

In a new cell, add your ngrok authtoken:

3. Start a tunnel

Start a tunnel to your local port (for example, 8080):
Use the printed URL to access your service through ngrok.