App Health, Expiry and Request Limits
Check backend readiness, see expiry warnings, opt into owner alerts and configure finite upload limits.
Last updated on
A running TSLink node and a healthy backend are separate facts. While its daemon runs, TSLink checks each registered backend and reports health and expiry evidence through CLI status, diagnostics and MCP.
Check useful application behavior
Choose a small, read-only endpoint that checks the dependencies your app needs:
tslink add preview --proxy localhost:3000 --health-path /ready --health-status-min 200 --health-status-max 299 --health-body ready --health-timeout 5s --health-interval 1m
tslink status --json
tslink list --verbose
tslink doctor --jsonThe app must implement /ready. Default HTTP checks use GET /, status 200–399, no body assertion, a 5-second timeout and a 1-minute interval. Redirects are not followed. Body matching checks the first 64 KiB; use a non-sensitive substring. Same-name add replaces other service settings too; use health set to edit only the check. With no explicit range, 200-399 is accepted. With just one explicit bound, the other still defaults to 200 or 299; 401/403 require an explicit range.
| Observation | Meaning |
|---|---|
healthy | Most recent check succeeded |
degraded | One or two unreachable checks, or any unexpected status/body response |
down | Three consecutive unreachable checks; records app_down |
unknown | No current usable observation, including a stale check |
TCP checks connect to the backend; file checks verify the shared path. Backend checks do not prove remote tailnet access, TLS or policy. Test the actual app URL from a permitted receiving device too. Monitoring does not restart your application.
Change only the health check
tslink health set preview --path /health
tslink health set preview --status-max 401
tslink health set preview --interval 5m
tslink health set preview --resethealth set changes only health settings in one registry transaction, keeping access lists, tags, people scope, routes and the enrolled node without restarting it. Options omitted retain their values; --reset clears stored health settings before applying other options. --path, --status-min, --status-max and --body are proxy-only; --timeout and --interval also apply to file/TCP checks. The owner MCP equivalent is health_set (body_contains for --body).
Unexpected status/body responses stay degraded indefinitely, never down, and send no app_down alert. Failure counts restart when the failure class changes. JSON/MCP/events include observed HTTP status_code when a response arrived; bodies and redirect targets are not recorded. doctor reports app_probe_unexpected_response as a warning with the status and an exact tslink health set suggestion. Observations older than twice the interval plus timeout are unknown.
Portal-only apps are checked without visitor traffic. Remote checks use the tagged gateway's netstack, never the host network; doctor --probe-external does not probe those targets from the host. See gateway mode.
Expiry and owner alerts
Status reports the node's observed key deadline rather than guessing a lifetime. Warnings begin at 14 days, become critical at 3 days, and distinguish unknown deadlines. Credential expiry estimates are labeled separately.
Health changes and expiry thresholds enter a local alert journal. To opt into notifications, create owner-controlled alerts.json in TSLink's config directory (0600 on POSIX), select one command or HTTPS webhook, then restart the daemon:
{"command":["/absolute/path/to/your-notifier","owner-channel"]}The command receives event JSON on stdin and runs with the daemon's permissions. Delivery is bounded, rate-limited, best effort and at most once; it can be lost and is not retried. These owner-notification limits are not HTTP request-rate throttling. See the TSLink alert guide for event fields and webhook configuration.
Public Funnel has a separate exposure deadline. Use tslink add demo --proxy localhost:3000 --funnel --public --funnel-ttl 1h only for an intentionally public app with suitable application authentication. A new Funnel defaults to 24 hours, with a default 7d public maximum; new public never is refused. See durations. People deadlines apply only to private HTTP/files.
Uploads and request limits
For large photos or videos, choose a finite whole-request bound, including multipart metadata:
tslink add photos --proxy localhost:2283 --max-request-body 20GiB --request-read-timeout 2mDefaults are 32 MiB bodies, a 10-second header window, a 30-second body-read inactivity window, and 60-second keep-alive idle timeout. --request-header-timeout and --idle-timeout adjust their respective windows. These bound size and inactivity, not requests per second. Streaming responses and WebSocket connections are not limited by the upload window; backend limits still apply.
Removing the body cap requires both --max-request-body unlimited --ack-unlimited-request-body. HTTP middleware rate limiting, Basic Auth, CORS and IP allow lists remain planned.
Sources: TSLink health and alerts, TSLink sharing and request limits.
See also: follow daemon lifecycle management when a health investigation requires restarting an installed background service.
http.server link expiry
python3 -m http.server has no notion of time and a tunnel only carries traffic. What an expiring link needs you to write yourself, and what TSLink guest links and other tools already provide.
Access history
Check retained app access and authority changes, understand missing records, and choose path privacy.