How it works
- Install ngrok
- Start your backend API on your development machine
- Run
ngrok http <port>to get a public HTTPS URL - Point your mobile app at the ngrok URL instead of
localhost - Test your app against your local backend from any device
Quick example
Benefits for mobile development
- Test on real devices: Access your local server from physical phones and tablets on any network.
- No deployment required: Skip deploying to staging just to test a backend change.
- HTTPS by default: ngrok provides a valid TLS certificate, so your app’s HTTPS requirements are satisfied automatically.
- Inspect traffic: Use the Traffic Inspector to see exactly what requests your mobile app is making and what responses it receives.
Stable URLs
Your account’s dev domain doesn’t change when you restart ngrok, so you only need to configure your mobile app once. On paid plans, you can use the--url flag to pick a domain name yourself:
Next steps
- Quickstart: get started with ngrok in minutes
- Authentication: add auth to your endpoint to restrict access during testing
- Traffic inspection: debug requests from your mobile app