Aller au contenu

Licensing

Ce contenu n’est pas encore disponible dans votre langue.

Pia Server reads its active licence at startup and exposes the current state on the License page (/admin/license).

  • EditionCommunity, Pro, Cloud, etc.
  • Licensed to — name and email recorded when the licence was issued.
  • Expires at — UTC instant, with a colour-coded badge (green / amber / red).
  • Seat countsMaxUsers, MaxAdmins, plus current usage.
  • Feature flags — comma-separated list (e.g. LocalAuth, OAuth, AiProxy, Sync, AdminDashboard, E2EE).

The same data drives the global License status banner that appears across the admin UI when the licence is missing, expired, or near expiry.

/admin/license-events shows the audit trail: licence loaded, refreshed, expired, replaced. Useful when investigating why the server’s behaviour changed at a particular moment.

Pia uses the pia-license CLI tool to mint and verify licence files. The keypair must be created once per environment and the public key embedded in the server before the binary is shipped.

Terminal window
# 1. Create a keyset (once per environment)
.\pia-license.exe gen-keys --out audience --passphrase 123
# 2. Issue a licence
.\pia-license.exe issue \
--private-key .\test\private.encrypted.txt \
--passphrase 123 \
--edition Cloud \
--name dev1 \
--email marco.altmann@neo42.de \
--max-users 100000 \
--max-admins 100 \
--features LocalAuth,OAuth,AiProxy,Sync,AdminDashboard,E2EE \
--out cloud.xml
# 3. Embed the public key
# Paste it into LicenseKey.cs before building the server.

Drop the issued .xml file onto the server (the path is set by License:Path in appsettings.json, default licence.xml next to the binary). Restart the server, and the new licence becomes active.

When the licence expires the server enters a read-only mode: existing users can still sign in and pull, but write paths (sync push, admin actions, AI proxy) are disabled. A renewed licence brings the server back to full service immediately on next request — no restart needed.