Enable and configure Ngrok
Enable and configure Ngrok
Ngrok exposes a local Devilbox project through a temporary public URL, which is useful for webhook testing, client previews, and mobile-device checks.
How it works
Devilbox keeps optional integrations as override snippets in the compose/
directory. To enable Ngrok, copy its snippet into the project root as
docker-compose.override.yml, then start the stack.
Enable
cp compose/docker-compose.override.yml-ngrok docker-compose.override.yml./dvl.sh upConfiguration
The snippet defines service ngrok with image devilbox/ngrok:0.3, hostname
ngrok, IP 172.16.238.202, and admin port ${HOST_PORT_NGROK:-4040}:4040.
It does not mount volumes.
| Variable | Default | Purpose |
|---|---|---|
NGROK_HTTP_TUNNELS | httpd:httpd:80 | Tunnel definitions. |
NGROK_AUTHTOKEN | empty | Ngrok account token. |
NGROK_REGION | us | Region used by the Ngrok client. |
HOST_PORT_NGROK | 4040 | Host port for the Ngrok inspection UI. |
Tunnel definitions use this format:
<public-name>:<docker-hostname>:<container-port>For example:
NGROK_HTTP_TUNNELS=my-project.loc:httpd:80NGROK_AUTHTOKEN=<your token>NGROK_REGION=usUsage
Open the Ngrok inspection UI:
open http://localhost:4040Expose the default HTTPD service:
NGROK_HTTP_TUNNELS=my-project.loc:httpd:80./dvl.sh upExpose Varnish instead of HTTPD when the Varnish override is active:
NGROK_HTTP_TUNNELS=my-project.loc:varnish:6081./dvl.sh upDisable
./dvl.sh downrm docker-compose.override.yml./dvl.sh upTroubleshooting
- If no public URL appears, set a valid
NGROK_AUTHTOKENand check the Ngrok container logs. - If the tunnel opens but your site returns an error, verify the second field in
NGROK_HTTP_TUNNELSis a Docker hostname reachable from the Ngrok container. - If the inspection UI does not load, change
HOST_PORT_NGROKwhen port4040is already in use.