Skip to main content
← All guides

Gradio share=True alternative: private app sharing

Why qURL here

Let someone try the Gradio app running on your own machine and GPU, without putting it on a public host. No signup is needed for qURL™. Keep Gradio on localhost and set root_path to the exact browser origin of the recipient’s open qURL link.

Steps

As a Gradio share=True alternative, qURL by LayerV publishes your app on 127.0.0.1:7860 without a public URL. Run qurl publish, then qurl share. After the recipient opens the link, set root_path to their exact https origin, restart Gradio, and ask them to reload the same page.

  1. Install the qURL CLI

    Install the qURL CLI. On macOS, install it with Homebrew. On Linux and Windows, download the package for your platform from the latest release; the CLI page lists each one. Nothing asks you to sign up.

    brew install layervai/tap/qurl
    qurl --version
  2. Launch the app on localhost, with share off

    Gradio’s demo.launch() serves localhost:7860 by default, listens on 127.0.0.1 and takes the first free port from 7860; it prints the URL it chose. Leave share=True out, and don’t set server_name to 0.0.0.0 or GRADIO_SERVER_NAME: the app stays on this machine. If the app needs a login, keep auth= as it is; it still applies through the link. Keep the app running, and use a second terminal for the qurl commands, with the port Gradio printed.

    python app.py   # demo.launch() serves http://127.0.0.1:7860
  3. Publish the app

    Publish Gradio through qURL. The first publish creates this device’s identity, starts a background service that keeps serving after you close the terminal (while you stay logged in), and prints the app’s CRID, its stable ID. The Access row says who can open the app: a plain publish makes it private from qurl 3.4.1 on. qurl share turns the CRID into an access link, and the link is what you send.

    qurl publish http://127.0.0.1:7860
  4. Point Gradio at the recipient’s origin

    Gradio builds the URLs its page calls from the X-Forwarded-Host and X-Forwarded-Proto headers. Through qURL those name c-….qurl.site over http, while the recipient’s browser is on https://r_….qurl.site, so the page loads, perhaps without its styling, but its requests to the app are blocked as mixed content. Ask the recipient to send you the exact https origin from the address bar of the page they just opened (scheme and hostname, without a path). They must keep that page open; do not open their single-use link yourself. Stop the app, start it again with GRADIO_ROOT_PATH set to that origin, and ask them to reload the same page. Gradio uses a root_path that is a full URL as it is. Do not use https://*.qurl.site: it includes apps run by other publishers. If your code already passes root_path to launch(), change it there. It takes one origin, so the app serves one recipient’s link at a time, and on your own machine the app at 127.0.0.1 points at the recipient’s address until you start it again without root_path.

    GRADIO_ROOT_PATH=https://r_your-link.qurl.site python app.py
    # or in code: demo.launch(root_path="https://r_your-link.qurl.site")
  5. End the review and restore local settings

    Stop sharing, then unset GRADIO_ROOT_PATH or remove the root_path value you added before restarting Gradio for local use. Keep any settings the app already had.

    qurl stop <CRID>

What the recipient sees

After the reload, the recipient uses the app at an address like https://r_….qurl.site/.

More

Results arrive as Gradio produces them: its queue sends progress and results as Server-Sent Events, and Server-Sent Events pass through a qURL link. If you kept auth=, they see Gradio’s login page first.

Troubleshooting

Troubleshooting
If you seeDo this
The page loads, perhaps unstyled, but Submit never returnsThe browser console shows Mixed Content errors for http://c-….qurl.site: Gradio is still building its URLs from the host it receives. Restart it with root_path set to the recipient’s exact https origin, as in the last step, and have them reload the page.
After the restart, Gradio prints a port other than 7860The old process still held 7860, so Gradio took the next free port, and qURL still points at 7860. Stop the old process and start the app again.
Show 7 more fixes
More troubleshooting
If you seeDo this
root_path is set, and the recipient’s page still failsThe origin must match their address bar exactly: https, the full r_….qurl.site hostname, and no path. A new link can land on a new hostname; ask for it again and restart with that one.
qurl publish says the local app is not accepting TCP connectionsStart the app first and check that curl works on the same address. qurl publish connects to localhost as 127.0.0.1, so if your app listens only on IPv6 (on macOS or Linux, lsof -iTCP -sTCP:LISTEN -nP shows [::1]), publish 'http://[::1]:PORT' instead, or start the dev server with --host 127.0.0.1 and publish that address. Neither requires listening on your LAN. Keep the quotes: zsh treats the brackets as a pattern.
The recipient sees “Access link invalid”The link was already used or has expired. Run qurl share again and send the new link.
The recipient sees “Resource not found”The resource was deleted after the link was made. Publish the app again, then run qurl share and send the new link.
publish rejects http://127.0.0.1 with “only HTTPS URLs are allowed”, asks you to log in, or prints no Access: lineYour qURL CLI is out of date. On macOS run brew update, then brew upgrade qurl; elsewhere install the latest release. After updating, qurl --version prints 3.4.1 or later, and every publish is private by default.
publish says this Linux session “can’t reach a systemd user manager”You are in a container or sandbox without a user service manager. Run qurl publish with --foreground; sharing lasts as long as that process runs. Container and CI setup →
publish says “Quota Exceeded” with “protected resource limit reached”, or “Your qURL account has reached a plan limit”You can see this without an account: a device with no account can keep up to 3 active resources, with links that last up to 24 hours. Run qurl list --status active, then qurl delete <CRID> for any you no longer need (it asks you to confirm; --yes skips that). qurl stop keeps the resource, so it does not free a slot.

Frequently Asked Questions

How do I share a Gradio app privately?

To share a Gradio app privately, keep share=True off and publish the local app through qURL. After the recipient opens their access link, set root_path to their exact https origin and restart Gradio so its requests reach that browser address.

Is a Gradio share link public?

Yes. A Gradio share=True link is public: anyone with its gradio.live URL can use the app while it lasts. qURL shares the local app through a single-use access link instead; keep Gradio auth= on for sensitive data.

Does Gradio streaming work through qURL?

Gradio’s queue uses Server-Sent Events, which qURL carries. Set root_path to the recipient’s exact origin so those requests reach the same browser address. Cloudflare Quick Tunnels do not support Server-Sent Events.

How long does a Gradio share link last?

Gradio’s guide says share links expire after 1 week, and the console says “up to 1 week (best effort)”. They run through Gradio’s share servers and are public: anyone who has the URL can use the app.

Why does Gradio need root_path through qURL and not on localhost?

Gradio works out its public URL from the request. Through qURL the request names c-….qurl.site over http, while the browser is on https://r_….qurl.site. Gradio’s page keeps a root URL whose hostname differs from its own, so its calls go to the wrong address. A root_path that is a full URL is used as it is.

Should I still set auth=?

Yes. Gradio sets its login cookie without a Domain, so it belongs to the host the browser is on, and the login request reaches the app once root_path names that host. Keep auth= for anything sensitive.

Who else can reach my app while the link is open?

Opening a qURL link starts a session for that browser, which lasts 1 hour by default. After a browser opens it, another browser on the same public IP cannot use its access. A script or agent that opens the link without a browser is admitted by its network address instead, which other devices on that public IP share until the session ends. A link admits whoever opens it: the API’s IP and country rules do not apply to the signed links qurl share issues. Keep your app’s own sign-in for anything sensitive.

Does my computer have to stay on?

Yes. Your Gradio app runs on your machine. The machine and app must stay running and connected; the app is unavailable while the machine is asleep.

How do I stop sharing?

Run qurl stop <CRID> to pause serving the app, and qurl start <CRID> to resume it; a stopped app still counts toward your resource limit. qurl delete <CRID> removes the resource for good after asking you to confirm; its CRID can never be shared again.

Publish your app now

Install the CLI, then run one command. No sign-up, no API key.

Install the CLI →

Book a pilot

Tell us what to hide. We’ll scope a pilot.

Enterprise starts with a paid pilot on one application, typically 60 to 90 days, credited in full toward year one if you convert within 60 days. After that, an annual package sized to what you protect, not per seat.