Activate your license
Activate your ModPageSpeed 2.0 license key on nginx and the worker.
ModPageSpeed 2.0 is distributed today under a commercial subscription, with binding terms set out in the Terms of Service. The Ed25519 license token system is enforced: without a valid token the worker stops optimizing and the nginx interceptor passes requests through to the origin unmodified. The web server, admin console, and management endpoints stay available so you can install or refresh a token.
License Model
ModPageSpeed 2.0 uses a two-layer licensing approach:
- Commercial subscription — The binding legal agreement covering billing, support, and operational use. See the Terms of Service. Source publication under Business Source License 1.1 (BSL) is on the public roadmap; no date is committed yet.
- Ed25519 license token — A cryptographic token that identifies you as a licensed customer. Both the nginx interceptor and the worker verify this token on startup. If the token is missing, invalid, or expired, the worker stops optimizing and nginx falls back to pass-through. The admin console and management endpoints remain accessible so you can install or refresh a token.
The token is a signed identity record — customer, plan, expiry — that the software reads on startup to display license status in the web console and logs.
Token Format
A license token is a single base64url-encoded string (no padding) containing:
- A 64-byte Ed25519 signature
- A JSON payload
The JSON payload contains:
| Field | Description |
|---|---|
sub | Customer email address |
iss | Issuer (modpagespeed.com) |
iat | Issued-at timestamp (Unix epoch) |
exp | Expiry timestamp (0 = no expiry) |
plan | Plan name (e.g., pro) |
sid | Subscription ID (optional) |
kid | Key ID for key rotation (optional) |
The token is verified against an Ed25519 public key embedded in the binary. Signature verification and expiry checks run once at startup.
Activating Your License
Both the nginx interceptor and the worker accept the license key. You should configure it on both components.
Environment Variable (Recommended)
Set PAGESPEED_LICENSE_KEY in your environment:
export PAGESPEED_LICENSE_KEY="your-token-here"
For Docker Compose, add it to your .env file:
PAGESPEED_LICENSE_KEY=your-token-here
For Kubernetes, the Helm chart handles this via values.yaml:
licenseKey: 'your-token-here'
Or reference an existing Kubernetes secret:
existingSecret: 'my-license-secret'
existingSecretKey: 'license-key'
Command-Line Flag
Pass the token directly to each binary:
# Factory Worker
factory_worker --license-key your-token-here --cache-path /data/cache.vol
# nginx module reads from the environment variable only
The environment variable approach is preferred because it works for both components and avoids exposing the token in process listings.
What Happens Without a License
If no license key is configured, or if the provided key is invalid or expired:
- Both components start, but the worker does not optimize and nginx passes requests through to the origin unmodified
- A warning is logged once at startup:
WARNING: No valid license key configured. See https://modpagespeed.com/pricing/ - The web console shows an unlicensed status indicator
- No optimizations run — requests pass through to the origin unmodified until a valid license is configured
The commercial subscription Terms of Service still apply regardless of whether a token is present.
Trial and Evaluation
ModPageSpeed 2.0 offers a 14-day free trial. During the trial period:
- You receive a license token with a 14-day expiry
- All features are fully available
- Credit card required
After the trial expires, the token verification fails with an expired status.
Once the trial expires, the worker stops optimizing and nginx passes requests
through unmodified. Your license status changes to expired in the web console
and logs.
Purchase a subscription at modpagespeed.com/pricing/ to receive a production license token.
Verification
Confirm your license is active by checking the worker logs at startup:
# systemd
sudo journalctl -u pagespeed-worker | grep -i license
# Docker
docker compose logs worker | grep -i license
A valid license produces:
INFO: License valid: plan=pro, customer=you@example.com, expires=2027-01-15
An invalid or missing license produces:
WARNING: No valid license key configured. See https://modpagespeed.com/pricing/
Troubleshooting
”Invalid signature”
The token has been corrupted or truncated. Common causes:
- Copy-paste errors (missing characters at the beginning or end)
- Line breaks inserted into the token string
- Wrong token (e.g., a token from a different product)
Re-copy the full token from your purchase confirmation email or the web console account page. The token is a single line with no spaces or line breaks.
”Token expired”
The exp field in the token payload is in the past. This happens when:
- A trial period has ended
- A subscription has lapsed
Renew your subscription to receive a new token.
”Token too short”
The base64url-decoded token is shorter than 64 bytes (the minimum Ed25519 signature size). This usually means the token was truncated during copy-paste.
License key not picked up
If the worker or nginx does not seem to read the license key:
- Verify the environment variable is set in the correct scope (the process that runs the binary, not just your shell session)
- For Docker, verify the variable appears in
docker compose exec worker env - For Kubernetes, verify the secret exists and is mounted:
kubectl get secret <name> -o yaml - For systemd, add the variable to the service file’s
Environment=orEnvironmentFile=directive
Next Steps
- Configuration Reference — All worker flags and nginx directives
- Deployment Guide — Production setup for Docker, systemd, and Kubernetes
- Pricing — Plans and subscription options