# Gradio share=True alternative: private app sharing

> A Gradio share=True alternative: share your app with qURL by LayerV, keep it on 127.0.0.1:7860, and set root_path to the recipient’s exact origin.

Source: https://layerv.ai/guides/share-gradio-app-privately/

---

[← All guides](https://layerv.ai/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.

Copies a prompt for any agent that runs commands. 

## What you need

- A Gradio app you start with demo.launch()
- The qURL CLI 3.4.1 or later

Content updated November 4, 2026.

## 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. ### Create a link  
`qurl share` prints an access link (https://qurl.link/#…). On a terminal, the lines below it say who published the resource and when the link expires, for example “Expires in 1d (single use)”. A publisher LayerV has verified is shown as verified by LayerV; any other name is marked UNVERIFIED. With no flags the link can be opened once and expires within 24 hours. If the expiry line does not say “single use”, don’t send the link. Add --ttl 1h for a shorter window.  
```  
qurl share <CRID>
```
5. ### Send the link to one person  
Send the qURL link directly to the recipient. Send it in a direct message, not a public channel: whoever opens it first uses it. Avoid email and apps that preview links, because a scanner that runs the page could use its one opening. Don’t open it yourself to check it, for the same reason. Run `qurl share` again whenever you need a fresh link.
6. ### 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")
```
7. ### 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/.

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 see                                                 | Do this                                                                                                                                                                                                                                                         |
| ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The page loads, perhaps unstyled, but Submit never returns | The 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 7860    | The 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.                                                                                                               |

__More troubleshooting__
| If you see                                                                                                             | Do this                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| root\_path is set, and the recipient’s page still fails                                                                | The 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 connections                                                       | Start 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: line     | Your 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 →](https://layerv.ai/guides/share-from-a-container-or-ci/)                                                                                                                                                                                                  |
| 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.

## Related Resources

[Guide: Share a Streamlit app privately →](https://layerv.ai/guides/share-streamlit-app-privately/) [Guide: Share a Jupyter notebook remotely →](https://layerv.ai/guides/share-jupyter-notebook-privately/) [Guide: Access ComfyUI remotely with a private link →](https://layerv.ai/guides/share-comfyui-privately/) [Guide: Share an MLflow or TensorBoard dashboard →](https://layerv.ai/guides/share-mlflow-or-tensorboard-dashboard/) [Guide: Share a streaming AI chatbot →](https://layerv.ai/guides/share-streaming-ai-demo/) [Gradio docs: sharing your app ↗](https://www.gradio.app/guides/sharing-your-app) [Gradio docs: running behind Nginx (root\_path) ↗](https://www.gradio.app/guides/running-gradio-on-your-web-server-with-nginx)

## Publish your app now

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

[Install the CLI →](https://layerv.ai/cli/)



---

*This markdown version is auto-generated from [https://layerv.ai/guides/share-gradio-app-privately/](https://layerv.ai/guides/share-gradio-app-privately/) for AI agents. Curated agent resources: [llms.txt](https://layerv.ai/llms.txt). For the full interactive experience, visit the HTML version.*

