Skip to the page

Share

Sharing a port

Give the dev server on your computer a public address: every flag, what passes through, and what to do when a page looks wrong.

Share a port

ouicu share 3000

The port is where your dev server listens: often 3000 for Next.js, 5173 for Vite, 4321 for Astro. ouicu forwards each visitor's request to localhost on that port and sends the answer back. Your terminal lists each request with its status and how long it took.

Keep the terminal open while people look, and press Ctrl-C to stop. Your computer shares nothing else: only that port, and only while the command runs.

New to this? The guide How to share localhost with someone explains what a tunnel does, step by step.

Flags

Flags for ouicu share
FlagWhat it doesPlans
--name <name>Use a reserved name: <name>.ouicu.app.Hobby and Pro
--passwordAsk visitors for a password, typed at the prompt or read from OUICU_PASSWORD.Hobby and Pro
--allow <emails>Only these people may open it: addresses, or @domain for everyone at one, comma-separated.Pro
--no-qrLeave out the QR code for opening the link on a phone.All
--jsonPrint one JSON object a line instead of text.All

A name that stays (Hobby and Pro)

ouicu share 3000 --name studiolund

This shares at https://studiolund.ouicu.app. The first time you use a name, it is reserved for you, so next week's link is the same as today's. Without --name, each share gets a random name. See Names.

A password (Hobby and Pro)

ouicu share 3000 --password

You type the password twice; it isn't shown. In scripts and CI, set OUICU_PASSWORD instead, and ouicu reads it from there:

OUICU_PASSWORD="$PREVIEW_PASSWORD" ouicu share 3000 --password

Passwords are 8 to 200 characters. Visitors type it once and stay in for 7 days in that browser. More in Who can open a link.

Only invited people (Pro)

ouicu share 3000 --allow [email protected],@studiolund.dk

Only Anna, and anyone with an address at studiolund.dk, can open it. They type their email address on ouicu's page and get a link to open it. Up to 50 entries. Use --password or --allow, not both. More in Who can open a link.

Without the QR code

At a terminal, ouicu draws the link as a QR code for your phone. --no-qr leaves it out. See QR codes.

JSON events

ouicu share 3000 --json

For scripts and tools: one JSON object a line on stdout, each with an event.

Events ouicu share --json prints
EventFieldsWhen
liveurl name expiresAt notice password peopleThe link works.
reconnectedBack at the same address after the connection dropped.
requestmethod path status msA visitor's request was answered.
noticetextSomething ouicu wants you to know, like a file it kept back.
retryingmessage secondsThe connection dropped or ouicu was out of reach; it tries again in that many seconds.
stoppedreasonThe share ended, and why. The command exits next.
errormessageWhat went wrong. The command exits with 1 next.
A few lines of it
{"event":"live","url":"https://studiolund.ouicu.app","name":"studiolund","expiresAt":null,"notice":false,"password":false,"people":false}{"event":"request","method":"GET","path":"/","status":200,"ms":12}{"event":"stopped","reason":"you stopped it on ouicu.com"}

expiresAt is when the plan's time limit ends the share, or null. From Node, the SDK reads these events for you.

Reconnecting

If the connection drops, because the Wi-Fi changed, your laptop woke up or ouicu restarted, the command tries again on its own. It waits a second, then a little longer each time, up to 30 seconds. The share comes back at the same address, random names included, and the terminal says Reconnected.

While it's away, visitors see a page saying nothing is shared there right now. Under a reserved name on Hobby and Pro, they see its last version instead.

A share stopped from the dashboard or the API, or one that reached its time limit, doesn't come back. Run ouicu share again for a new one.

Time limits and how many at once

Share limits by plan
FreeHobbyPro
How long a share runs2 hoursNo limitNo limit
Live shares at once1310

With a time limit, the terminal says when the share will stop. When it does, run ouicu share again for a new one, with a new random name. A new share under a name you already share at replaces the old one, so it doesn't count twice.

Hot reload and WebSockets

WebSockets pass straight through, so hot reload works: save a file and the page updates on their screen too.

Your dev server sees each request as coming to localhost on its own port, so Vite, Next.js and webpack need no host settings. The public address arrives in the X-Forwarded-Host header, with X-Forwarded-Proto: https.

What isn't passed on

ouicu shares web pages: HTML, styles, scripts, images, fonts, JSON and WebAssembly. Videos, audio, documents, archives, installers and anything sent as a download are kept from visitors, and so is any response over 50 MB. Visitors get a page saying it isn't shared through ouicu, and your terminal says what was kept back.

Images your pages load are fine, including the ones Next.js optimizes and sends as downloads. To show a video, put it on a video service and embed it from there.

Troubleshooting

“The site isn't running yet”

Nothing listens on the port you shared, and your terminal logs those requests as 502. Start your dev server, or check the port number. ouicu connects to localhost, over IPv4 or IPv6.

“The computer sharing this isn't answering”

The connection to your computer dropped for a moment, and visitors got a 503. ouicu reconnects by itself; ask them to try again in a few seconds.

“The site closed the connection”

Your dev server ended a request without an answer, and visitors got a 503. It usually crashed or restarted; its own terminal often says why.

“Not passed to visitors” in your terminal

A response was a video, audio, a download or a file over 50 MB, so visitors got a 403 page instead. See what isn't passed on.

“Nothing is shared here”

No share runs at that address: it ended, or the link has a typo. Run ouicu share again. With a random name, send the new link.

“Too many requests”

A share answers up to 50 requests a second, and 25 a second for one visitor, with room for short bursts. Past that, visitors see this page for a few seconds.

When ouicu refuses to start

  • That name is taken. Someone else holds it, or uses it right now. Pick another.
  • Free allows 1 live share at a time. Stop one first. Your plan's shares are all running. Stop one with Ctrl-C, or with Stop on the dashboard.
  • That API key does not work. The key was revoked, or a key from ouicu login went 90 days unused. Run ouicu login.
  • Confirm your email address first. Open the link in the email ouicu sent when you signed up.
  • You've used this month's 1 GB of data on Free, so your previews are paused. They open again when the month turns. See Plans and data.