Skip to main content
← All guides

Share an app from a remote dev server over SSH

Why qURL here

Share the app running on your remote dev server without opening an inbound port. With systemd lingering and an enabled app service, qURL™ keeps serving after SSH logout and a reboot.

Steps

On the server, install the qURL CLI, run loginctl enable-linger once, run the app as an enabled systemd user service, and publish it with qurl publish. qURL runs sharing as a systemd user service, and without lingering systemd stops your services when your last SSH session ends. With it, the app and the share keep running after you disconnect, and come back after a reboot.

  1. Install the qURL CLI on the server

    Run this in your SSH session. It is the qURL skill’s installer: it checks the download against the release checksums and installs into ~/.local/bin, with no sudo. Add the export line to ~/.bashrc or ~/.zshrc if later sessions should find qurl.

    (umask 022 && mkdir -p "$HOME/.local/bin" "$HOME/.local/state") &&
      chmod go-w "$HOME/.local" "$HOME/.local/bin" "$HOME/.local/state" &&
      installer=$(mktemp) &&
      curl -fsSL --retry 3 --proto '=https' -o "$installer" \
        https://raw.githubusercontent.com/layervai/qurl-integrations/main/scripts/install.sh &&
      INSTALL_DIR="$HOME/.local/bin" sh "$installer" &&
      rm -f "$installer"
    export PATH="$HOME/.local/bin:$PATH"
    qurl --version
  2. Turn on lingering for your user, once

    qurl publish installs its background service as a systemd user service. systemd starts your user manager when you log in and stops it, with every user service, a few seconds after your last session ends; lingering keeps it running and starts it at boot. Where polkit runs, as on Ubuntu cloud images, systemd’s default policy lets you turn lingering on for yourself, with no sudo. Without polkit, as in many minimal images, the command answers “Access denied”, and an administrator runs sudo loginctl enable-linger with your user name. The second line should print Linger=yes.

    loginctl enable-linger
    loginctl show-user "$USER" --property=Linger
  3. Run the app as a user service

    An app started in your SSH shell may stop when you disconnect. A user service belongs to the user manager that lingering keeps, so it keeps running, and an enabled one starts again after a reboot. Run this in the app’s folder, and replace npm run dev with your own start command; make the app listen on 127.0.0.1 so it is not exposed on the server’s network. The file records your shell’s PATH and the full path of npm, because a service does not read your shell profile. This example requires paths without percent signs, quotes or backslashes; systemd treats those specially. Replace port 3000 with your app’s port (Vite uses 5173 by default). Read its output with journalctl --user -u preview-app, and stop it with systemctl --user stop preview-app. For a share that only has to last until the next reboot, systemd-run --user --unit=preview-app --same-dir -E PATH npm run dev is enough.

    mkdir -p ~/.config/systemd/user
    cat > ~/.config/systemd/user/preview-app.service <<EOF
    [Unit]
    Description=App shared with qURL
    
    [Service]
    WorkingDirectory=$PWD
    Environment="PATH=$PATH"
    ExecStart="$(command -v npm)" run dev
    Restart=on-failure
    
    [Install]
    WantedBy=default.target
    EOF
    systemctl --user daemon-reload
    systemctl --user enable --now preview-app
    for _ in $(seq 1 30); do curl -fsS -o /dev/null http://127.0.0.1:3000 && echo up && break; sleep 1; done
  4. Publish the app

    Replace 3000 with your app’s port. The first publish creates this server’s qURL identity, starts the background service, and prints the CRID. The Access line says private: nobody else can open it until you share it. With lingering on, the qURL service keeps serving after you log out, and it starts again after a reboot along with the app’s service.

    qurl publish http://127.0.0.1:3000
  5. Check it after you disconnect

    Before you log out, make one more link, for yourself. Log out, wait a minute, then open that link on your laptop: the app should load. Don’t check with ssh <server> qurl status instead: that login starts your user manager again, so it reports the share as running even when lingering is off.

    qurl share <CRID> --ttl 1h

What the recipient sees

They open the link in a browser and see the app served from your server, at a qurl.site address with no sign-up.

More

They keep access for the session, 1 hour by default, whether or not you are still connected over SSH.

Ways to share an app on a remote server, compared

Vendor rows follow the facts in /compare/localhost-tunnels (checked 2026-10-01) and the VS Code docs (checked 2026-11-04).

Ways to share an app on a remote server, compared
OptionWho can open itViewer needsHow long it lasts
qURL with lingering (this guide)Nobody until you share; then whoever opens a one-time linkA browser; no accountUntil you stop it; it survives SSH logout and reboots
Tailscale ServeAuthorized Tailscale users, including accepted machine-share recipientsThe Tailscale clientUntil stopped; --bg keeps it running across reboots
Tailscale FunnelPublic: anyone on the internetA browserUntil you turn it off
Microsoft dev tunnelsPrivate by default; your tenant, a GitHub organization, or anonymousA sign-in unless anonymous; an anti-phishing page on the first visitA temporary tunnel ends when the host disconnects
Cloudflare Tunnel (named)Public unless you add a Cloudflare Access applicationA browser, plus an Access login if you add oneNo per-link expiry
ngrokPublic: anyone with the URLA browser; free-plan browser traffic sees a warning page firstWhile the ngrok agent runs
VS Code Remote-SSH or ssh -L forwardingOnly you, on your own machineNot applicableWhile VS Code or the ssh connection is open

Sources: Every localhost tunnel, compared, Tailscale Serve, Tailscale Funnel, Microsoft dev tunnels: security, Cloudflare Tunnel, ngrok free plan limits, VS Code Remote-SSH.

Troubleshooting

Troubleshooting
If you seeDo this
The link worked until you logged out, then the app stopped answeringLingering is off, so systemd stopped your user services at logout. Run loginctl enable-linger and check that Linger=yes. Logging in starts the qURL service again; start the app as in step 3, and send a new link.
qurl status says serving, but the recipient sees “The page you requested was not found”qURL is connected but the app is not running. An app started from your SSH shell can end at logout, and one started with systemd-run is gone after a reboot. Run it as the enabled user service of step 3, check systemctl --user status preview-app, then send a new link.
Show 7 more fixes
More troubleshooting
If you seeDo this
systemd-run says it failed to connect to the bus, or the service cannot find npmYour session has no user manager: log in over SSH again, not with su or sudo -u, so XDG_RUNTIME_DIR is set. For a missing runtime, pass -E PATH, or give the command’s full path.
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

Why not run the app with nohup or tmux?

Not reliably. systemd-logind’s KillUserProcesses setting decides whether your session’s processes are killed when you log out. systemd’s documented default is yes, which the systemd docs warn breaks tmux and screen; Ubuntu ships KillUserProcesses=no, so there they usually survive. Either way they don’t come back after a reboot. A user service is outside the session, so lingering keeps it, and enabling it brings it back at boot.

Can I share it with VS Code’s Ports panel or code tunnel?

Not with someone else. Over Remote-SSH, VS Code forwards the server’s port to your own machine, and its dev-tunnel port forwarding exposes only services running locally, not over a remote connection. code tunnel gives you remote access to the server, with the same GitHub or Microsoft account on both ends and one user at a time.

How is this different from Tailscale Serve or Funnel?

Tailscale Serve shares the app inside your tailnet, so each viewer needs the Tailscale client and access to your tailnet. Tailscale Funnel makes it public to anyone on the internet, with no access control on Funnel traffic. qURL needs nothing installed by the viewer and keeps the app private until you share a link.

Does the server need an open port?

No. qURL connects out from the server, and the app listens on 127.0.0.1 only. Publishing does not close other routes: if the app also listens on 0.0.0.0 or a firewall port is open, it stays reachable there.

Can my coding agent do this over SSH?

Yes. An agent that runs on the server, or runs commands there over SSH, can follow the same steps; the qURL skill uses the same installer. Turning on lingering changes how your account runs services, so have it ask you first.

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

Opening the 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.

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.