Skip to main content
← All guides

Share an app from a GitHub Codespace privately

Why qURL here

Show someone the app running inside your Codespace while keeping its port private. qURL™ publishes from the foreground process, so the share lasts while that process and Codespace run.

Steps

A private Codespaces port opens only for you, and the other choice for someone outside your organization is a public port that anyone with the URL can open. Instead, install the qURL CLI in the codespace, publish the app in the foreground, and send a one-time link from qurl share. Keep the codespace from timing out while they use it.

  1. Install the qURL CLI in the codespace

    This is the qURL skill’s installer: it checks the download against the release checksums and installs into ~/.local/bin, with no sudo. ~/.local is outside /workspaces, so a rebuild of the container removes the CLI and its identity; a stop and start keeps both.

    (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. Publish the app in the foreground

    Codespaces’ default images don’t run systemd, so the background service can’t start (their systemctl is a stand-in that only prints a notice); --foreground serves from this shell instead. Replace 3000 with your app’s port. With --foreground the share lasts as long as this process runs. The block waits up to 90 seconds for the CRID and prints the publish log if publishing fails. Keep the commands in one shell: $pub and $CRID don’t carry over to a new one. The app’s Codespaces port stays as it was, private to you unless you changed it.

    run=$(mktemp -d)
    nohup qurl publish http://127.0.0.1:3000 --foreground --quiet \
      > "$run/crid" 2> "$run/publish.log" < /dev/null &
    pub=$!
    for _ in $(seq 1 90); do
      [ "$(wc -c < "$run/crid")" -ge 60 ] && break
      kill -0 "$pub" 2>/dev/null || break
      sleep 1
    done
    CRID=$(head -n 1 "$run/crid")
    [ -n "$CRID" ] || { echo "publish failed:"; cat "$run/publish.log"; kill "$pub" 2>/dev/null; false; }
  3. Keep the codespace awake while they use it

    GitHub stops an idle codespace after 30 minutes by default, and stopping it ends the share. Typing and terminal output reset the timer; traffic to a shared port does not, unless it writes to a terminal. Before a long review, raise your timeout (up to 240 minutes) in your Codespaces settings, or keep the dev server’s request log in an open terminal.

  4. Stop sharing

    Stop the publisher when the review is done. The resource and its CRID stay; publishing the same port again later returns the same CRID.

    kill "$pub"

What the recipient sees

They open the link in a browser and see your app, served from the codespace, with no GitHub sign-in.

More

When the codespace stops or you stop the publisher, the app stops answering.

How cloud dev environments share a running port

From each vendor’s docs, checked on 2026-11-04. qURL works the same in each: install the CLI in the workspace and publish in the foreground.

How cloud dev environments share a running port
EnvironmentDefaultOther levelsViewer needsStops when idle
GitHub CodespacesPrivate: visible only to youOrganization (GitHub Team or Enterprise Cloud); Public: anyone who knows the URL and portGitHub sign-in, except on a public portAfter 30 minutes by default; 5 to 240 minutes
Ona (formerly Gitpod)Creator only, when the CLI opens a portOrganization members only; Anyone (no login required)Sign-in, except at the everyone levelAfter 30 minutes if no preference is set
CoderOwner: only the workspace ownerOrganization; Authenticated (any user of the deployment); PublicA Coder login, except on a public portWorkspaces shut down after a period of inactivity
DaytonaNot documentedPublic sandbox: preview links open without authentication; otherwise a token or a signed URL (60 seconds by default, up to 24 hours)A preview token or a signed URL, unless the sandbox is publicAfter 15 minutes by default
DevPodForwards ports to your own machine over SSHNot documentedNot applicable: only youForwarding needs your IDE or an SSH session open
qURL in any of thesePrivate: nobody else until you shareOne-time links from qurl share; device keys with qurl grants --addA browser; no accountWhen the workspace stops, so the share stops with it

Sources: GitHub Codespaces: forwarding ports, GitHub Codespaces: timeout period, Ona: ports, Ona: port sharing policy, Ona: environment timeout, Coder: port forwarding, Coder: workspace scheduling, Daytona: preview and authentication, Daytona: sandboxes, DevPod: how it works.

Troubleshooting

Troubleshooting
If you seeDo this
The app stopped answering partway through a reviewThe codespace probably timed out. Start it again, run the publish block again in a new terminal, and send a new link. After a stop and start the CRID is the same; after a rebuild it is new.
publish says “qurl: command not found” after a rebuildA rebuild keeps only /workspaces. Run the install step again; the first publish then creates a new identity and a new CRID.
Show 7 more fixes
More troubleshooting
If you seeDo this
The recipient sees “Blocked request”, “Invalid Host header” or a similar host errorThe dev server rejects qURL’s hostname. The guide to allowing a tunnel’s hostname lists the setting for each framework.
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 just send the forwarded Codespaces URL?

GitHub makes a forwarded port private by default, and a private port is visible only to you. An organization port reaches members of the repository’s organization, and a public port anyone who knows the URL and port number.

Does the share survive closing the browser tab?

Yes, while the codespace keeps running. Closing the tab does not stop a codespace; the idle timeout does. Stopping the codespace, or a rebuild, ends the share.

Does this work in Ona (Gitpod), Coder, Daytona or DevPod?

Yes: the steps are plain shell for any Linux workspace that can reach the internet. Each of these stops idle workspaces, Ona after 30 minutes and Daytona after 15 by default, and the share stops with the workspace. Where a workspace runs systemd, a plain qurl publish also works.

Can I share it with VS Code’s Ports panel instead?

Not from a remote workspace. VS Code’s own port forwarding through dev tunnels exposes only services running on your local machine, and its docs say remote connections aren’t supported yet. In a codespace the Ports panel sets the Codespaces port visibility described above.

Can a coding agent in the codespace do this?

Yes. The steps are plain shell, and the qURL skill uses the same installer and the same foreground block. Ask it to keep the publish and the commands that use $CRID in one shell, because many agent tools end background jobs when a command returns.

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.

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.