Skip to Content
TSLinkTSLink Docs

Share an App with a Person and a Deadline

Share a self-hosted app privately for seven days, invite someone outside your tailnet, and revoke access.

Last updated on

View as Markdown

New installations default to the home gateway; existing installations keep their mode. See installation for node and enrollment behavior.

One grant action checks membership, preserves existing permissions, prepares routes and completes necessary invitations. people add is additive: new grants default to 24h and retries preserve omitted deadlines. add --allow and MCP add/share allow keep permanent defaults unless a lifetime is supplied. invite device and MCP invite_device also default new grants to permanent and preserve existing deadlines; limit them with people add --for/--until. Explicit never needs acknowledgement. Expiring MCP bindings and reduced roles keep a 24h omitted lifetime and their scope limits. Incomplete setup returns an error with retained state; pending recipient acceptance is a completed owner action.

Both entry paths use the same person/app keys; gateway security checks retain exceptions documented in access history.

To give one person access to one app until a deadline, register a private HTTP app, grant their actual Tailscale login that app for seven days, and send its exact URL. When finished, run tslink people remove <login> to deny that person on subsequent requests. The app stays on your computer and keeps its own login.

This walkthrough uses one app named review-app on port 3000. Choose either step 2 for a tailnet member or step 3 for an outsider, then verify and revoke. For a file instead, see share one HTML report privately.

Before you start

  • Host: macOS 13 Ventura or later, or Linux with a working systemd user manager; commands use bash or zsh. Install TSLink. The CLI and running daemon must use TSLink v0.4.0 for the behavior below; after a background-service upgrade, rerun tslink install. Windows installation is covered in the installation guide.
  • App: a private HTTP app already running at http://localhost:3000; first open it locally and check the expected response. TSLink registers the route, not the application. Keep its own authentication enabled. Use an unused TSLink name: ordinary add replaces an existing service and drops flags you omit.
  • Tailscale: MagicDNS and HTTPS enabled; network policy permits the recipient to reach the app node. The host needs no separate Tailscale installation. The recipient needs Tailscale connected and signed in with their actual Tailscale login, which can differ from their contact email. A tagged machine cannot use a person's grant.
  • Credentials: browser enrollment and local member grants need no stored API credential. Automated outsider invitations require a stored user-owned Tailscale API access token; an OAuth client token cannot create device invites. Store a token through the stdin login path, keeping it out of arguments and public logs.

Recipients can install Tailscale from the official downloads: iPhone/iPad, Android, Mac, or all platforms.

1. Register and enroll one app

Replace you@example.com with your own Tailscale login and the port with your app's actual port:

bash
tslink add review-app --proxy localhost:3000 --allow you@example.com --json

The owner allow rule keeps your own access when people scope is introduced. add ensures the background service is running, but does not start the backend. If the result is needs_login, open its auth_url as the owner and complete enrollment and any administrator device approval. This is a pending handoff, not a ready app address. Then run:

bash
tslink url review-app --wait --json
tslink status --urls --name review-app --json

Require data.runtime_snapshot.exact: true and the service's endpoint.state: "exact"; inspect runtime_state and errors. The address can be a gateway route such as https://home.<your-tailnet>.ts.net:8443/ or an app-node URL such as https://<app-node>.<your-tailnet>.ts.net (a schematic, not output). Copy the exact returned runtime URL instead of constructing a hostname from review-app. Bare --wait waits up to 30 seconds. TSLink verification contract

For an existing Jellyfin server, you can instead preview tslink apps share jellyfin --allow you@example.com, then apply it with --yes and retrieve tslink url jellyfin --wait. Check the recipe's port and app-side settings, retain Jellyfin login, and substitute jellyfin for review-app in the remaining steps. Recipes do not install or configure the app.

2. Give a tailnet member seven days

Replace alice@example.com with the recipient's actual Tailscale login:

bash
tslink people add alice@example.com --apps review-app --for 7d --json
tslink people list --json

Read data.person.grants from add: this app should have active: true and its stored UTC expires_at. List returns data.people. These are documented fields, not sample output. Send the generated message and exact app URL yourself. Existing tailnet members need no device invitation when their network policy permits reaching the app.

The first grant makes the app person-scoped: unlisted callers need an active grant or an explicit legacy --allow rule. For a known untagged person, their app set overrides legacy allow rules; expiry or losing an app denies new requests. Explicitly allowed owners and other people keep their own access. --apps all selects currently registered private HTTP/file apps only, including no future apps. Use the one app's name here.

3. Invite someone outside your tailnet instead

For a new outsider, use this instead of step 2's add command:

bash
tslink people add alice@example.com --apps review-app --for 7d --invite --print-links --json

This saves local grants and prepares the necessary invitation: one gateway device share for routed apps, or individual shares in per-app mode. TSLink does not send an email; send the generated message yourself. The recipient installs Tailscale, signs in with the named account, accepts the device invitation, keeps Tailscale connected, and opens the exact app address. An invitation can be accepted with another account, but TSLink denies that other login: the grant binds the verified WhoIs login. The invitation URL and the app URL serve different steps.

Invitation links are bearer capabilities. --print-links explicitly reveals them; otherwise URLs stay hidden. The registry records IDs and states, never invitation URLs or tokens. In per-app mode, several apps mean several accepts; routed apps in gateway mode use one gateway invitation.

A bundle can partially fail while local grants remain saved. Inspect complete, per-app code and state, when setup returns an error. Resume unfinished work with tslink people update alice@example.com --invite --print-links --json; completed operations reuse their IDs and deadlines stay unchanged. An unknown POST outcome needs owner-verified reconciliation, not a blind retry. See the TSLink people guide for recovery. Without an API token, you can create the device share manually in Tailscale's Machines page and send it with the ordinary local-grant message.

4. Verify with the recipient, then revoke

  1. Have Alice keep Tailscale connected, use the granted login, and open the exact URL. An outsider first accepts the app invitation. Have her confirm the expected app content after the app's own sign-in; a running daemon or healthy backend does not prove her access.
  2. Check tslink people list --json for the app's active grant and deadline. If an address is absent from the message, finish enrollment and retrieve it using tslink status --urls --json.
  3. If local history is enabled, inspect retained requests with tslink access log --app review-app --who alice@example.com --since 1h --json. Records are bounded and can be dropped; an empty result does not prove that no request occurred. See access history.
  4. Revoke the person when the task ends, even before the deadline:
bash
tslink people remove alice@example.com --json
tslink people list --json

Check revoked in the removal result and the person's list entry. Ask Alice to make a new HTTP request or reconnect: it should be denied. Confirm the owner can still open the app. Removal is person-wide: it removes that login's grants and matching legacy allow entries across apps, including denying them on formerly unrestricted private HTTP/file apps. To keep a person's other apps, narrow their app set with people update --apps instead. TSLink enforcement and expiry

What expiry and revocation mean

Deadlines are checked on every request; at or after the stored deadline, a new HTTP request or WebSocket upgrade is denied. An already accepted download, response stream or WebSocket connection may finish, and delivered data cannot be recalled. Revocation does not stop the backend or daemon, revoke tailnet membership, edit network policy, or necessarily delete an accepted device share.

Removal saves local denial before pending-invitation cleanup. Inspect complete and cleanup; deferred remote cleanup does not undo local denial. Restore the user-owned API token and retry the same removal if cleanup is incomplete. Accepted network shares may need separate Tailscale management. TCP and open public Funnel cannot be person-scoped; a guest-gated app retains people enforcement on its private listener.

If the walkthrough stops

SymptomCheck and recovery
needs_login, auth_url, or no exact app URLThe owner completes browser enrollment/device approval. Run tslink status --urls --json for data.pending_logins, then retry url for this app. Send the runtime app URL after enrollment.
App fails locally; health is degraded, down or unknownRun tslink doctor --json, check the app process/port and health.last_error/status_code. Only three consecutive unreachable checks become down; unexpected HTTP responses remain degraded, and missing/stale checks are unknown. For an authenticated backend, use a real readiness path or an explicitly accepted status range via tslink health set; keep the access settings. Health guide
Recipient cannot connect, or a new request is deniedCheck Tailscale connection, network policy, outsider invitation acceptance and the exact WhoIs login. Inspect people list --json for active, expired, expires_at and revoked; an app login alone does not grant TSLink access. A deliberate new grant is needed after expiry/revocation.
conflict, or add/update names an unsupported appUse people update for an existing active person. people_service_unsupported means the app is TCP, open Funnel or guest-gated (while its guest gate is up an app cannot take new people grants); select a private HTTP/file app without guest links. Changing only --apps retains existing deadlines and gives new apps 24h. --for and --until are mutually exclusive; minimum 1h, with default guest maximum 7d.
Invitation or removal returns complete: falseLocal grants/denial may already be saved. Inspect per-app code, state or cleanup. Resume invitations with the invite-only update above, or retry removal after restoring the API token. A sending/unknown outcome requires owner-verified reconciliation before another create; do not create a standalone replacement invite blindly.

Change the window or choose the next task

While Alice's grant is still active, before removal, shorten the same app's window to one hour with:

bash
tslink people update alice@example.com --apps review-app --for 1h

For one app, tslink extend review-app --person alice@example.com --for 36h sets now + 36h, which can shorten a longer deadline. An expired grant needs --regrant; this never clears a revoked person's tombstone. Re-adding a removed person is an explicit new grant and waits for outstanding invite cleanup/reconciliation. Duration syntax covers absolute --until deadlines, minimum 1h, new-grant default 24h and the default 7d guest cap. Invitation history keeps guest duration policy even after acceptance. Eligible member permanent grants require --for never --ack-never.

Next: verify one successful recipient request and one denied request after revocation. For more apps or a shared home address, continue with the portal options below.

Can someone use only a browser?

Private people sharing requires Tailscale. Browser guest links now offer one HTTP proxy app with a finite deadline and optional PIN through explicitly public Funnel and a mandatory guest gate. Links/PINs can be forwarded and do not prove identity. Open Funnel is a separate publication with no TSLink visitor identity gate; new public exposure defaults to 24h and refuses never.

Related: Local AI · Agent/MCP setup · Choose a sharing tool.

Sources: TSLink sharing boundaries, people guide.

A home address and QR

Enable the private per-host portal, then use people add/update --qr or --qr-png <existing-directory/file.png> for the exact address. Tailscale installation, correct login, device shares and policy permission remain prerequisites. One QR does not install apps or approve access; in directory-only mode, outsiders need the portal node shared separately from app nodes. Gateway routes instead use one share of the gateway node.

Gateway invitations and people summaries

People-scoped apps report allow.mode: people in list, status and add, even with gateway mode off. Gateway mode creates one device invite per person for routed apps, with no new acceptance for later grant changes; non-routed apps still need separate shares. A NodeID change can cause gateway_invite_stale. First prove the new persistent gateway's ownership through status/doctor, then use people update --invite --replace-invite @gateway=<old-id> to retire the old attempt; a stale attempt without an ID needs --reconcile-invite @gateway=none. This does not revoke an old accepted remote share; the recipient must accept the new invitation. See the gateway guide for the full procedure.

Table of Contents