Skip to main content
On this page

Licensing

A community self-hosted installation includes 10 user seats without registration on piping.space, an activation token or payment. Install the product and sign in locally first — see Install with Docker. Additional seats are optional; licensing does not unlock a separate set of product features.

Activated installations periodically validate their entitlement. An issued entitlement retains its signed seat limit, including limits below 10.

License model

The control plane issues an entitlement as an EdDSA (Ed25519) signed JWT. The instance verifies the signature locally against a verification public key baked into the instance binary at build time (issuer, audience, validity window, and instance binding are all checked, with a 30-second clock-skew allowance). The key is compiled in and cannot be overridden at runtime. The verified entitlement defines:

  • the seat limit (maxSeats),
  • the validity window (validFrom / validUntil),
  • the instance fingerprint the entitlement is bound to,
  • an entitlement version used for incremental refreshes.

The entitlement and encrypted activation token are stored locally. The instance contacts the control plane on activation and periodic refresh.

License states

GET /api/v1/license/state reports one of:

StatusMeaning
inactiveNever activated. The default 10-seat limit applies.
activeValid entitlement. Full seat limit available.
graceRepeated refresh failures; grace window is running. Existing seats work, new seats are blocked.
expiredEntitlement past validUntil, or the grace window elapsed. New seats are blocked.
suspendedThe control plane suspended the subscription.

Transient refresh failures below the grace threshold put the instance into an internal degraded phase: the state endpoint still reports active, and the failure is visible in Last Sync Error and in GET /api/v1/license/health/details.

Seats and what is gated

A seat is a user slot, assigned on a user's first login and counted against the seat limit:

  • A user who already holds a seat always logs in — in every state, including grace and expired.
  • A user without a seat gets one if capacity remains; otherwise login is denied with LICENSE_SEAT_LIMIT_EXCEEDED.
  • In grace and expired states, new seat allocation is denied with LICENSE_GRACE_ENDED.
  • If the entitlement is past its deadline, new seats are denied with LICENSE_REFRESH_REQUIRED.

Every assignment and denial records a seat-ledger event (seat_assigned, seat_denied). Activation assigns seats to users with live sessions up to the new limit. Licensing does not restrict features or terminate sessions. See Access control for user and login permissions.

Activate additional seats

If you need more than the included seats:

  1. Register an account on piping.space, purchase the required additional seats and create an activation token in the cabinet.
  2. Open Administration → License, paste the token into Activation Token, and click Activate.
  3. The backend exchanges the token with the control plane, verifies the returned entitlement JWT, and stores the license state as active.

Activation binds the entitlement to the instance fingerprint. Re-activating a fresh token on the same instance is fine; pointing an instance at an entitlement bound to a different fingerprint is rejected with 409 ENTITLEMENT_BINDING_INVALID. Control-plane rejections (TOKEN_EXPIRED, TOKEN_REVOKED, TOKEN_ALREADY_CONSUMED, SUBSCRIPTION_NOT_ACTIVE, …) come back as 409/422 with the reason code in the error body.

Every activation attempt — success or rejection — is written to the operational timeline in the audit log.

Background refresh

A background worker re-validates the entitlement on a fixed interval (default every 6 hours). On failure it retries with exponential backoff (base 30 s, capped at 5 min, plus jitter) and increments a failure counter. A successful refresh resets the counter and clears any grace window. If no control-plane base URL is configured, the worker idles.

You can force a re-validation at any time with the Refresh button on the license page or POST /api/v1/license/refresh.

Grace and expiry

Expiry is driven by two independent clocks:

  1. Entitlement deadline — once validUntil passes, the state is expired regardless of connectivity.
  2. Refresh failures — after 3 consecutive failed refreshes (configurable), a grace window starts (default 72 hours). During grace the state is grace; when the window elapses without a successful refresh, the state becomes expired.

In both grace and expired, existing seat holders keep full access; only new seat allocation is blocked. A successful refresh or re-activation returns the instance to active and clears the grace window.

GET /api/v1/license/health/details exposes the full picture: grace timestamps, last sync times, the last error, a failure classification (CONTROL_PLANE_UNAVAILABLE, ENTITLEMENT_INVALID, CONTROL_PLANE_RESPONSE_INVALID, LOCAL_PERSISTENCE_ERROR), and the consecutive-failure count.

The license page

Administration → License has two cards:

  • Status — entitlement status chip, entitlement version, Seats (used / total), Valid From, Valid Until, and Last Sync Error.
  • Activation — the Activation Token input, a read-only Instance Fingerprint field, and the Activate / Refresh buttons.

Configuration

All knobs live under the license config section (env prefix PIPING_LICENSE__, see Configuration):

VariableDefaultPurpose
PIPING_LICENSE__BASE_URL(empty)Control-plane base URL. Production: https://piping.space; empty disables background refresh.
PIPING_LICENSE__REFRESH_INTERVAL_SECONDS21600Background refresh interval (6 h).
PIPING_LICENSE__GRACE_FAILURE_THRESHOLD3Consecutive refresh failures before the grace window starts.
PIPING_LICENSE__GRACE_PERIOD_SECONDS259200Grace window length (72 h).
PIPING_LICENSE__REQUEST_TIMEOUT_MS5000Timeout for control-plane HTTP calls.

With an empty PIPING_LICENSE__BASE_URL, an unactivated installation uses its default 10-seat limit without outbound license calls. Download access and any separately configured integrations remain independent of licensing.

REST API reference

All endpoints require an authenticated session. activate and refresh accept an optional Idempotency-Key header.

MethodPathPurpose
GET/api/v1/license/stateCurrent entitlement state
POST/api/v1/license/activateActivate with { "activationToken", "instanceFingerprint" }
POST/api/v1/license/refreshForce re-validation against the control plane
GET/api/v1/license/health/detailsGrace window, sync timestamps, failure classification

Example state response:

{
  "status": "active",
  "seatLimit": 25,
  "seatsUsed": 7,
  "validFrom": "2026-01-15T09:30:00+00:00",
  "validUntil": "2027-01-15T09:30:00+00:00",
  "version": 4211398260518237
}

The authoritative schema is in the bundled OpenAPI contract — see API reference.