This guide explains how to set up ngrok with a fixed domain using an Edge.
- Go to ngrok Dashboard → Domains.
- Click "New Domain" and create one
- Navigate to ngrok Dashboard → Edges
- Click "New Edge" and select "HTTPS Edge".
- Assign your existing domain.
- Copy the Edge ID (e.g.,
edghts_XXXXXXXXX
).
Edit your ngrok configuration:
ngrok config edit
Replace with:
version: 3
agent:
authtoken: XXXXXXXXXXXXXXX
tunnels:
backend:
labels:
- edge=edghts_XXXXXXXXX
addr: http://localhost:8000
inspect: false
authtoken
: Get from dashboardedge=edghts_XXXXXXXXX
: Uses the Edge ID for a fixed domain.addr
: Maps to your local service (localhost:8000
andlocalhost:3000
).inspect: false
: Disables ngrok’s web inspector.- can replace
backend
with any word
Ctrl+X to save
Run:
ngrok start backend
Now, your backend and frontend will be accessible at your fixed ngrok domain.