Skip to main content
n8n allows you to self-host, which is great when you’re testing workflows, but when you’re ready to turn your instance into a production-ready automation solution and don’t want to buy a domain or pay for hosting, you might feel lost. ngrok works with the self-hosted and enterprise editions of n8n, including Docker, Docker Compose, and npm-based installs, to make them securely available on the public internet. That way, you can share n8n with colleagues or accept webhooks to fire off workflows.
Building with LLMs?We want your feedback! Sign up for early access to ngrok’s AI Gateway and our team will reach out to learn more about your needs.

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
Once that file is saved, you can either create a docker-compose.yaml file to run both services together or run them as separate containers with docker run.