Skip to main content
ModPageSpeed 2.0: AVIF, WebP, and critical CSS — up to 69% less page weight on the live demo
2.0 1.1

Activate your license

Activate your ModPageSpeed 2.0 license key on nginx and the worker.

On this page

ModPageSpeed 2.0 is distributed today under a commercial subscription, with binding terms set out in the Terms of Service. Production use requires a commercial license — but the software never locks you out. The optimization engine always runs and optimizes responses regardless of license state; when no valid Ed25519 token is present the engine keeps optimizing but signals the unlicensed state with an X-PageSpeed-Warn: unlicensed response header, a notice in the admin console, and a warning in the startup log. 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:

  1. 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.
  2. 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 engine keeps optimizing but flags the installation as unlicensed (see What Happens Without a License); a valid token is still required for production use. 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:

FieldDescription
subCustomer email address
issIssuer (modpagespeed.com)
iatIssued-at timestamp (Unix epoch)
expExpiry timestamp (0 = no expiry)
planPlan name (e.g., pro)
sidSubscription ID (optional)
kidKey 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.

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, the installation is treated as unlicensed. A valid license is still required for production use, but the optimization engine keeps running. The unlicensed state is signalled three ways:

  • Both components start and the worker keeps optimizing responses
  • An X-PageSpeed-Warn: unlicensed header is added to responses
  • The web console shows an unlicensed status indicator
  • A warning is logged once at startup: WARNING: No valid license key configured. See https://modpagespeed.com/pricing/

The commercial subscription Terms of Service still apply regardless of whether a token is present.

Evaluation

You can evaluate ModPageSpeed 2.0 by installing and running it unlicensed — there is no separate trial to start. The optimization engine runs and optimizes responses in full; the only difference from a licensed install is that it signals the unlicensed state with an X-PageSpeed-Warn: unlicensed response header, a notice in the admin console, and a warning in the startup log. This lets you measure the engine against your own traffic before you buy.

When you are ready for production, purchase a subscription at modpagespeed.com/pricing/ — billed immediately on purchase via FastSpring — and apply the Ed25519 license token as described in Activating Your License. Production use requires a commercial license — but the software never locks you out.

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 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:

  1. Verify the environment variable is set in the correct scope (the process that runs the binary, not just your shell session)
  2. For Docker, verify the variable appears in docker compose exec worker env
  3. For Kubernetes, verify the secret exists and is mounted: kubectl get secret <name> -o yaml
  4. For systemd, add the variable to the service file’s Environment= or EnvironmentFile= directive

Next Steps