Skip to content

ts license

Show the license a server is running under, or install a new one. Reach for it after a purchase or a renewal, and whenever you need to establish which edition and expiry a server actually has rather than which one it is supposed to have.

Usage

text
ts license [print]
ts license set <file>
ts license set -

Description

ts license with no action prints the stored license: its id, the customer it was issued to, the edition, and the expiry date. An expired license still prints, marked (EXPIRED), so an expired license is never mistaken for a missing one.

A server with no license says so explicitly and falls back to unlicensed behavior. A license that is stored but no longer parses — a truncated paste, a file mangled in transit — prints the parse error instead of the fields. That is the case worth catching on a routine check, because the server behaves as if it were unlicensed until you fix it.

ts license set <file> installs a license document. Pass - instead of a path to read the document from standard input. Leading and trailing whitespace is trimmed, so a document copied out of an email works without cleanup.

The server parses and validates the document before it stores anything. An invalid document is rejected, the stored license is left exactly as it was, and ts prints the server's reason. A successful set then re-reads the license and prints it, so the command that installs a license also confirms what was installed.

Installing, replacing, or clearing a license is recorded in the audit log as LicenseChanged, attributed to the account that ran the command and carrying the license id.

One behavior to know before you script this: the server treats an empty document as "remove the license", not as an error. Piping nothing into ts license set -, or pointing it at an empty file, drops the server to unlicensed behavior and audits the change as a clear.

Examples

bash
# What is this server licensed for?
ts license

# Install a license file you were sent
ts license set turbo-license.xml

# Install from a pipe, so the document never lands on disk
your-secret-tool read turbo/license | ts license set -

# Check expiry across the servers you administer
for s in turbo-a.example.net turbo-b.example.net; do
  ts --server=https://$s license
done

# Careful: an empty document clears the license rather than failing
ts license set /dev/null

Output

text
License:  TS-2026-00412
Customer: Acme Corporation
Edition:  Enterprise
Expires:  2027-03-31T00:00:00.0000000Z

An unlicensed server prints one line instead:

text
No license is configured (unlicensed/evaluation behavior applies)

A stored document that cannot be parsed prints the reason:

text
Stored license is invalid: unexpected end of input

A rejected set reports the server's validation message and changes nothing:

text
Error: The server returned 400: The license document is not valid: signature check failed

--format=json returns the whole license object, which carries more than the table shows — the site, the evaluation flag, and the seat and device limits (uniqueUsers, simultaneousUsers, uniqueDevices, simultaneousDevices, userSimultaneousDevices). Use it when you are checking capacity against entitlement rather than reading an expiry date.

Exit Codes

0 on success, including on a server with no license configured — "unlicensed" is an answer, not a failure. -1 when the server rejects the document, or when the action word is neither print nor set. -6 when the file named for set does not exist. -4 when no account is signed in and -5 when the signed-in account is not a Server Administrator.

  • ts audit — The LicenseChanged entries: who installed which license, and when.
  • ts status — Whether the server is answering at all, before you conclude the license is the problem.
  • ts settings — The rest of the server-wide configuration.