Steps
With qURL™, run qurl publish with --foreground as a background job inside the container or CI step, wait for the CRID, then run qurl share. The share lasts as long as that process runs, and the link works once and expires within 24 hours. No account credential is stored in CI: the first publish on a fresh runner creates its own device identity in the runner’s qurl state, which lasts as long as the runner.
Install the qURL CLI in the job
This is the installer the qURL agent skill uses: it downloads the script to a temporary file rather than piping it into a shell, verifies the CLI against the release checksums, and never runs sudo. qurl refuses to keep its state under a directory other users can write to, so the first line creates and tightens those folders. Setting VERSION gives every run the same CLI and skips the script’s GitHub API lookup.
(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" VERSION=3.7.1 sh "$installer" && rm -f "$installer" export PATH="$HOME/.local/bin:$PATH" qurl --versionPublish in the foreground as a background job
Containers and some CI runners have no user service manager, so the default background service can’t start. --foreground serves from this process instead. This waits up to 90 seconds for the CRID and prints the publish log if it fails. Run all the steps in one shell or CI step: $run, $pub, and $CRID don’t carry over to a new step.
run=$(mktemp -d) nohup qurl publish http://127.0.0.1:3000 --foreground --quiet \ > "$run/crid" 2> "$run/publish.log" < /dev/null & pub=$! for i 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; }Create a link
Capture the link in a variable so it never reaches the build log. On GitHub Actions the second line masks it in everything the job prints afterwards; on any other CI that line prints nothing. Then send the link to the reviewer through a private channel.
link=$(qurl share "$CRID" --quiet) [ -z "${GITHUB_ACTIONS:-}" ] || echo "::add-mask::$link"Keep the job alive while people review, then clean up
The share stops when the publish process exits. Keep the job running for the review window (GitHub-hosted jobs end after at most 6 hours), then stop the publisher. On a runner that is thrown away after the job, also delete the resource: its identity goes with the runner, so the CRID can’t be used again anyway. On a runner that keeps its home directory, leave the last line out to keep the same CRID for the next run. If step 2 failed, $CRID is empty, but the resource may still exist: see the troubleshooting below.
sleep 3600 # the review window; at most 6 hours on GitHub-hosted runners kill "$pub" wait "$pub" || true qurl delete "$CRID" --yes
What the recipient sees
The reviewer opens the link in a browser and sees the build running inside your container.
More
When the job ends, the app stops answering.
Troubleshooting
| If you see | Do this |
|---|---|
| publish fails with “restrict share daemon socket: chmod …/daemon.sock: invalid argument” | qurl keeps its control socket with its state, under $HOME/.local/state by default, and that folder is shared from the host. Docker Desktop on macOS cannot set the mode of a socket in a bind-mounted folder, so this happens whenever the home directory is a -v mount from the Mac. --foreground does not avoid it. Set QURL_CONNECTOR_RUNTIME_DIR to a directory inside the container for every qurl command, for example docker run -e QURL_CONNECTOR_RUNTIME_DIR=/tmp/qurl-run, and publish again. The device identity stays where it is, and the publish reuses the resource the failed attempt created, with the same CRID. To keep all of qurl off the mount instead, put its state on a Docker volume with QURL_CONNECTOR_STATE_DIR. |
| qurl says “Other users can write to /home/… (mode 0777), so qURL can’t safely keep its files under it” | An image or setup script made the home directory writable by everyone, often with chmod 777, and qurl refuses to keep a device credential under it (exit code 3). Run chmod go-w on the directory the message names. If the home directory has to stay that way, set QURL_CONNECTOR_STATE_DIR to a directory that has no such parent, such as /tmp/qurl-state: a directory inside the 0777 home is refused too, while /tmp is accepted because of its sticky bit. |
Show 10 more fixes
| If you see | Do this |
|---|---|
| publish failed, but qurl list --status active shows the app | qurl publish creates the resource before it starts serving it. When starting the daemon or serving fails, it turns sharing off and leaves the resource in place. Fix the cause and run the same publish with the same state: it finds the resource and keeps its CRID. To remove it instead, run qurl list --status active -o json, take the crid whose target_url is your app’s address, and run qurl delete <CRID> --yes. Do it before the runner or container is thrown away: without its state, nothing can delete that resource. A failure before the resource exists, such as an app that is not running, creates nothing. |
| qurl share says “Resource Revoked (HTTP 400)” with exit code 5 | The resource was deleted, and a deleted resource can never be shared again. Publish the app again for a new CRID. In a cleanup script this is the answer that confirms a delete: qurl delete <CRID> --yes returns deleted: true again on a second run, so check with qurl share instead. |
| A second qurl publish --foreground fails with “qURL share daemon is already running” (exit code 11) | One state directory has one share daemon, and the first foreground publish runs it. While that process runs, publish each other app without --foreground: the running daemon serves it within seconds. Run qurl start <CRID> for the resource the failed attempt left stopped. Every app stops answering when the first process exits. |
| publish says qURL can’t start local sharing while this process is configured to use an HTTP proxy | Unset the lowercase http_proxy variable for the qurl publish command and run it again. |
| 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. |
| 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
Does this work in Docker Desktop on a Mac?
Yes, as long as qurl’s socket is not on a folder shared from the Mac. If the container’s home directory is a bind mount (docker run -v ~/something:/home/node), publish fails with “restrict share daemon socket … invalid argument”. Add -e QURL_CONNECTOR_RUNTIME_DIR=/tmp/qurl-run to docker run, or keep qurl’s whole state on a named volume: docker volume create qurl-state, then docker run -v qurl-state:/qurl-state -e QURL_CONNECTOR_STATE_DIR=/qurl-state. A new volume belongs to root, so make it the container user’s and private first, for example with docker run --rm --user root -v qurl-state:/qurl-state <image> sh -c "chown 1000:1000 /qurl-state && chmod 700 /qurl-state". Your app’s files can stay on the bind mount. Keep the volume until qurl delete has run: it holds the only identity that can delete the resource.
Do I need to store a key in CI?
No. The first publish on a fresh runner creates a device identity in the runner’s qurl state, so no key has to be stored in CI beforehand. On a runner that is thrown away after the job, that identity goes with it, and each run gets a new CRID. A self-hosted runner that keeps its home directory reuses its identity, and its CRID too when the job does not run qurl delete. Don’t copy the state directory into a cache or artifact: it holds the device credential.
Where should the link go?
Only to the people reviewing the build. Treat it like a password: don’t print it in build logs. Capture it with link=$(qurl share "$CRID" --quiet) and, on GitHub Actions, mask it with ::add-mask:: before anything else runs. Run that line only on GitHub Actions, as step 3 does: on any other CI it prints the link.
Can qurl run in a different container from the app?
Only if it shares the app’s network. qurl serves an app from the machine it runs on only at a loopback address (localhost or 127.0.0.1), so run it in the app’s container, in a sidecar on the same network namespace (network_mode: "service:app" in Docker Compose, or the same Kubernetes pod), or on the host with the app’s port published to 127.0.0.1.
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.