1: Reserve a domain
Navigate to the Domains section of the ngrok dashboard and click New + to reserve a free static domain like or a custom domain you already own. We’ll refer to this domain as$NGROK_DOMAIN from here on out.
2: Run n8n + ngrok
To run n8n and ngrok in Docker, you can either use Docker Compose to run both services together or run them as separate containers. In both cases, you can use a.env file to store configuration values.
Replace NGROK_DOMAIN and NGROK_AUTHTOKEN with your values, as well as N8N_HOST and WEBHOOK_URL with your reserved domain. If you don’t already have an authtoken, you can find it in your dashboard here.
.env
docker-compose.yaml file to run both services together or run them as separate containers with docker run.