Skip to the page

Share a Nuxt dev server with a client

nuxt dev shares through ouicu with hot reload and server routes, nothing to set. How that compares with nuxt dev --tunnel, and the generate build.

Updated

nuxt dev shares through ouicu as it comes: the page, hot reload and your server routes all work through the link, with nothing to set. Nuxt can also open a tunnel itself, with --tunnel; that one is free and needs no account, and the difference is what your client gets.

Nuxt at a glance
Nuxt
Dev server port3000
On your Wi-Finuxt dev --host 0.0.0.0
Host checkvite.server.allowedHosts
Build folder to upload.output/public, from nuxt generate
Nuxt through a ouicu link
Through the linkWhat it takes
The pageWorks, nothing to change
Hot reloadWorks, nothing to change
A POST to a server routeWorks, nothing to change

Share nuxt dev with ouicu

npm run dev# in a second terminalouicu share 3000

Nuxt says Network: use --host to expose as it starts. That's about your Wi-Fi: ouicu reaches the dev server on localhost, which is all it needs. On Free, a share runs for up to 2 hours. Getting started has the install.

Hot reload runs over wss://calm-otter-4821.ouicu.app/_nuxt/, on the link's own port. We changed the heading in app.vue with the link open and it changed in place, no reload. A button calling $fetch to POST to server/api/echo.post.ts got its answer, as Nitro has no origin check of its own to trip.

nuxt dev --tunnel, and how it differs

Nuxt's own help lists a tunnel:

From nuxt dev --help
--tunnel Expose the server via a Cloudflare quick tunnel

It's a fair choice for a quick look, and Cloudflare's docs say of these tunnels: “You do not need a Cloudflare account or domain.” We haven't run it behind this guide; here is what each side documents, for showing a client:

nuxt dev --tunnel and ouicu, for a client preview
nuxt dev --tunnelouicu share 3000
Sign-upQuick Tunnels need no Cloudflare account or domainA ouicu account, free to start
The addressQuick Tunnels: a new name each runA random name on Free; names you keep on Hobby and Pro
LimitsQuick Tunnels: 200 requests in flight, then 429Up to 2 hours a share on Free
Keeping strangers out--allowed-mail puts an emailed one-time PIN in front of a Quick Tunnel, since 2 October 2026A password on Hobby and Pro; named people on Pro

If the link is for you, on your phone, --tunnel is enough. For a client, a name that stays the same and a password tend to matter more (Cloudflare Tunnel and ouicu).

Blocked request, through other tunnels

Nuxt's dev server runs on Vite, which turns away hosts it doesn't know. A tunnel that passes your public name on as Host gets 403 and:

What the browser shows
Blocked request. This host ("calm-otter-4821.ouicu.app") is not allowed.To allow this host, add "calm-otter-4821.ouicu.app" to `server.allowedHosts` in vite.config.js.

ouicu hands Nuxt Host: localhost:3000, so you won't see it. With another tunnel, the help points at vite.config.js, but a Nuxt app sets it in nuxt.config.ts, where we tested it:

export default defineNuxtConfig({  vite: { server: { allowedHosts: ['.ouicu.app'] } },})

--public goes further. Nuxt's docs describe it as “Listen on all network interfaces and allow any host to connect”, so use it on a network you trust.

useRequestURL() and the link's address

Rendered on the server through the link, useRequestURL() gave https://localhost:3000/: the link's scheme with your laptop's name. It comes from h3, where the scheme follows the proxy by default, “If x-forwarded-proto header is set to "https", it will return "https".” while the host doesn't: “If xForwardedHost is true, it will use the x-forwarded-host header if it exists.” So ask for both:

const url = useRequestURL({ xForwardedHost: true, xForwardedProto: true })

It then rendered https://calm-otter-4821.ouicu.app/, as the browser has it, which matters for canonical links and og:url.

Upload what nuxt generate makes

From the docs on nuxt generate: “Pre-renders every route of the application and stores the result in plain HTML files.” They land in .output/public, ready to upload, and stay up with your laptop closed:

npx nuxt generateouicu deploy .output/public

Server routes don't come along: ouicu deploy serves files only (Uploading a built site). For those, build and share the server itself:

npx nuxt buildPORT=3000 node .output/server/index.mjs# in a second terminalouicu share 3000

Through the link its page loaded and its POST was answered, as in development.

Phones, and who can open it

The QR code ouicu prints opens the site on any phone (QR codes). For the same Wi-Fi without a link, start Nuxt with nuxt dev --host 0.0.0.0; see how to open localhost on your phone. Everyone with the link reaches your server routes too, so for a client add --password, on Hobby and Pro, or --allow with their email, on Pro (passwords and invited people).

Tested with Nuxt 4.6.0 on , with Node 24.21.0: the minimal starter from create-nuxt, with a page of our own and a server route, shared with ouicu share through ouicu's edge and opened in Chromium at its https link: nuxt dev with an edit and a POST, useRequestURL() with and without its options, allowedHosts, nuxt generate and the built server.

Sources

Prices, defaults and quotes about other products, and the day each was last checked at its source.

  1. Nuxt Configuration, Nuxt docs. Checked .
  2. nuxt dev, Nuxt docs. Checked .
  3. Deployment: Static Hosting, Nuxt docs. Checked .
  4. Quick Tunnels, Cloudflare docs. Checked .
  5. Protect Quick Tunnels with email authentication, Cloudflare changelog. Checked .
  6. hostCheck.ts, Vite on GitHub. Checked .
  7. src/utils/request.ts (v1), h3 on GitHub. Checked .
  8. nuxt generate, Nuxt docs. Checked .