Licensing
Madhyamas Enterprise requires a valid license file for production use. Licenses are Ed25519-signed JSON documents that encode the customer, plan, seat count, expiry, and enabled features.
License Installation
Via CLI Flag
madhyamas --license-file /path/to/license.jsonVia Environment Variable
export MADHYAMAS_LICENSE_FILE=/path/to/license.json
madhyamasVia Docker
# docker-compose.yml
services:
madhyamas:
environment:
MADHYAMAS_LICENSE_FILE: /licenses/license.json
volumes:
- ./licenses:/licenses:roVia Kubernetes Secret
kubectl create secret generic madhyamas-license \
--from-file=license.json=/path/to/license.json# deployment.yaml
spec:
containers:
- name: madhyamas
env:
- name: MADHYAMAS_LICENSE_FILE
value: /licenses/license.json
volumeMounts:
- name: license
mountPath: /licenses
readOnly: true
volumes:
- name: license
secret:
secretName: madhyamas-licenseLicense Verification
On startup, Madhyamas verifies the license:
- Signature verification — Ed25519 signature is checked against the embedded public key (the
madhyamasproduct's key; licenses are issued per product by the ShristiLabs licensing platform) - Expiry check — License must not be expired
- Instance ID check — If the license specifies an instance ID, it must match
--instance-id - Product check — The license's
product_idclaim must bemadhyamas(licenses issued for other ShristiLabs products are rejected) - Feature check — Enabled features are loaded from the license
If verification fails, Madhyamas starts in unlicensed mode with a warning. All features continue to work, but a banner is displayed in the web UI.
License file format
{
"license_id": "lic_abc123",
"product_id": "madhyamas",
"customer": "Acme Corp",
"plan": "enterprise",
"seats": 50,
"instance_id": "inst_xyz789",
"issued_at": "2026-01-01T00:00:00Z",
"expires_at": "2027-01-01T00:00:00Z",
"features": ["auth", "rbac", "audit", "oidc", "mfa"],
"signature": "base64_ed25519_signature_of_canonical_json"
}The required product_id field (claims format v2, 2026-08) scopes the license to a product. Licenses issued before this field existed (v1) fail with a parse error — re-download the license from the portal.
License Details
The License admin panel shows full license information:

Accessing the Panel
- Log in as an admin
- Click the License icon in the navigation rail
Information Displayed
| Field | Description |
|---|---|
| License ID | Unique license identifier |
| Customer | Licensed organization name |
| Plan | Pricing tier (Trial, Starter, Pro, Enterprise, Academic) |
| Instance ID | Bound instance ID (if any) |
| Issued | Issue date |
| Expires | Expiration date |
| Days Remaining | Days until expiration (with warning if < 30) |
| Seats | Number of licensed seats |
| Seat Usage | Current seats used / total |
| Enabled Features | List of features enabled by the license |
Seat Management
Seats are the number of concurrent Madhyamas instances allowed by the license. Each running instance consumes one seat.
How Seat Tracking Works
- Registration — On startup, the instance registers itself in Redis with a TTL of 120 seconds
- Heartbeat — The instance sends a heartbeat every 60 seconds, refreshing the TTL
- Enforcement — If
active_seats >= license_seats, the new instance fails to start - Release — On graceful shutdown (SIGTERM), the instance deregisters and releases its seat
- Auto-reap — If an instance crashes without deregistering, its seat is released when the TTL expires
Atomic registration
Seat registration uses a Redis Lua script for atomic ZADD + EXPIRE, preventing race conditions where two instances could register simultaneously and exceed the seat limit.
CLI
madhyamas license infoAPI
curl -H "Authorization: Bearer <token>" \
http://localhost:3001/api/license/infoPricing Tiers
| Plan | Seats | Price | Features |
|---|---|---|---|
| Trial | 5 | Free (30 days) | All enterprise features |
| Starter | 10 | $49/mo or $490/yr | All enterprise features |
| Pro | 50 | $199/mo or $1,990/yr | All enterprise features + priority support |
| Enterprise | Unlimited | $499/mo or $4,990/yr | All features + SSO + dedicated support |
| Academic | Unlimited | Free | Requires .edu email |
License Portal
Licenses are managed through the Madhyamas license portal:
- Register — Create an organization account
- Select a plan — Choose a pricing tier
- Pay — Stripe Checkout for credit card payment
- Download — Get your Ed25519-signed license file
- Install — Point
--license-fileat the downloaded file
Air-Gapped / Offline Licensing
For environments without internet access:
- Contact sales@madhyamas.ai to purchase a license
- Receive the license file via secure email or physical media
- Install via
--license-file
Offline licenses are verified entirely locally using the embedded Ed25519 public key — no phone-home or online verification required.
Renewal
Licenses can be renewed through the portal:
- Log in to madhyamas.ai
- Navigate to your license dashboard
- Click Renew and complete payment
- Download the new license file
- Replace the old file and restart Madhyamas
Zero-downtime renewal
In a multi-instance deployment, replace the license file on each instance one at a time. Instances with the old license continue working until restarted.
Transfer
Licenses can be transferred between organizations by contacting support@madhyamas.ai. The old license is revoked and a new one is issued.
Troubleshooting
| Problem | Solution |
|---|---|
License not found | Check that --license-file points to a valid file |
Invalid license signature | The license file was modified or corrupted. Re-download from the portal. |
License expired | Renew the license at madhyamas.ai |
Seat limit exceeded | Stop an unused instance or upgrade your plan |
Instance ID mismatch | Set --instance-id to match the value in the license, or remove the binding |
| License banner in UI | License is missing, expired, or invalid. Check the License panel for details. |
See Also
- Getting Started — First-run setup including license installation
- Multi-Instance Deployment — Seat coordination across instances
- Configuration — License-related CLI flags
- CLI & MCP Tools — License info via CLI and MCP