This guide shows you how to use ngrok with Flask development servers to share your local application with others. You can use either the ngrok agent or the Python SDK to expose your Flask app.Documentation Index
Fetch the complete documentation index at: https://ngrok.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
What you’ll need
- Python and Flask installed.
- An ngrok account.
- Your ngrok authtoken.
Option 1. Use the ngrok agent
To share a local Flask development server with someone else, run:SERVER_NAME and APPLICATION_ROOT in your Flask app configuration to the values provided by ngrok.
See the Flask configuration docs for more information.
For users on the latest MacOS, there is an issue where the default port 5000 (and 7000) is used by Apple AirPlay Receiver.
You can use a different port for your Flask app or disable the Apple AirPlay receiver by disabling it in System Settings > General > AirDrop & Handoff > AirPlay Receiver.