Skip to main content
Version: v5.6.1

opschain admin licence apply

Included from Basic tier

Uploads a licence file to the server — a multipart PUT of the file to /api/licence. The server verifies the file's Ed25519 signature before accepting it: a malformed, untrusted-key or tampered licence is the server's named 422 and nothing is stored. Expiry is computed state, not a verification failure — an expired licence applies cleanly and reports its state in admin licence show, which is what makes renewal painless: renewals accumulate beside their predecessor, and the licence expiring last wins.

The verb authenticates as the ordinary logged-in user and requires permission to update the /licence path; the admin bearer plays no part. A server target is required (--server <url>, OPSCHAIN_SERVER, or the active context).

Flags​

FlagMeaning
-f, --file <file.licence>The licence file to upload (required).

-o json|yaml prints the stored filename and the licence document as a machine document instead of the confirmation line.

Exit codes​

CodeMeaning
0Licence applied.
1The file was unreadable, the server refused it (e.g. the signature 422), or the request failed.
2Usage error — the file flag missing, or no server target.

Named errors​

  • reading the licence file: <cause> — the local file could not be read (exit 1).
  • the licence lives on a server — pass --server <url> or 'opschain context use <name>' — no server target (exit 2).

Examples​

opschain admin licence apply -f acme-2027.licence
applied licence acme-2027.licence

(The confirmation is followed by the stored licence document as JSON.)

See also​

  • opschain docs cli/admin-licence-show — state, limits and the renewal hint after applying.
  • opschain docs cli/admin-licence-remove — the explicit act that can revert to the Basic tier.