Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Expose your Nuxt application to the internet with ngrok tunnels — no DNS or deployment needed.
Nuxt ngrok is a Nuxt module that exposes your local Nuxt application to the internet through an ngrok tunnel, configured in a single line in nuxt.config.ts.
Nuxt ngrok is an open-source Nuxt module (package @nuxtjs/ngrok) that integrates the ngrok tunneling service directly into a Nuxt application. It takes the local server URL that Nuxt runs on and publishes it to a public HTTPS ngrok URL, printing that URL in the console on startup. The module is maintained in the nuxt-modules/ngrok GitHub repository and works with Nuxt 3; a separate version, @nuxtjs/[email protected], supports Nuxt 2.
npx nuxi@latest module add ngrok, then add @nuxtjs/ngrok to the modules array in nuxt.config.ts; no additional code is required to get a tunnel.authtoken_from_env: true to read NGROK_AUTHTOKEN from the environment, or set the authtoken option directly with your ngrok token.auth option accepts a username and password in the format username:password to require credentials on the public tunnel.domain option lets you use a reserved domain from your ngrok account instead of a randomly assigned URL.production boolean option enables the tunnel for production builds, not just the dev server.✔ Ngrok connected at https://your_ngrok_url so you know the public address.Any developer building a Nuxt application who needs to share a running local server with someone else, without deploying or setting up DNS. Frontend developers can use it to verify webhook callbacks in local development, and mobile developers can open the public HTTPS URL from a physical device to test against the Nuxt app running on their computer. It is also useful for QA testers who need to review a feature before it lands in a staging environment.
After you install the module and add it to nuxt.config.ts, running the Nuxt app starts an ngrok tunnel from your localhost to the ngrok edge. The module reads your configuration options (authtoken, auth, domain, production), connects to ngrok, and then outputs the public URL to the terminal. No DNS changes or deployment steps are needed.
Run npx nuxi@latest module add ngrok inside your Nuxt project. The command adds the package and updates the modules array in nuxt.config.ts. Then you can start the server and the ngrok URL will appear in the console.
Yes, Nuxt 2 support requires the older package version @nuxtjs/[email protected]. Instructions for that version are available on the Nuxt 2 documentation site.
Yes, if you have a reserved domain in your ngrok account, set the domain option in the module configuration and the tunnel will use that domain.
Yes, use the auth option with a username:password pair. This adds HTTP basic authentication to the public ngrok URL.
The module prints a confirmation line in the terminal, for example ✔ Ngrok connected at https://your_ngrok_url, so you can immediately copy the URL for sharing.
