Prepared License
Pre-configure license keys for automated license activation.
Manual vs Prepared Licensing
Manual:
- Start EmailEngine
- Log into web interface
- Navigate to Settings > License
- Enter license key
- Click "Activate"
Prepared (automated):
export EENGINE_PREPARED_LICENSE="your-license-key-here"
emailengine
License Key Formats
EENGINE_PREPARED_LICENSE supports two formats:
Format 1: Normal License Key (PEM Format)
The standard license key format provided by https://postalsys.com/:
export EENGINE_PREPARED_LICENSE="-----BEGIN LICENSE-----
Application: EmailEngine
Licensed to: Postal Systems OÜ
h6FspGM0NTSha6gwY2FlMjY2Y6Fus0V4YW1wbGUgQ29tcGFueSBJbmOhaKNBQ1OhYbFAZXhhbX
BsZS9kZW1vLWFwcKFjzwAAAZnw+ZsOoXPEK0VYQU1QTEVfU0lHTkFUVVJFX05PVF9WQUxJRF9G
T1JfUFVCTElDX0RFTU8=
-----END LICENSE-----"
emailengine
This is the recommended format - copy the license key exactly as shown in your account at https://postalsys.com/.
Format 2: Exported License Key
An encoded single-line format exported from EmailEngine CLI:
# Export an existing license
emailengine license export --dbs.redis="redis://localhost:6379"
# Output (example):
i0-AgqFsxFWFoWvEDGC7abcdefghijklmnopqrstuvwxyz...
# Use in another instance
export EENGINE_PREPARED_LICENSE="i0-AgqFsxFWFoWvEDGC7abcdefghijklmnopqrstuvwxyz..."
emailengine
Use case: Transfer license from one EmailEngine instance to another without accessing the license portal.
Configuration Methods
- Environment Variable
- Command-Line
- Docker
- Docker Compose
PEM format (recommended):
export EENGINE_PREPARED_LICENSE="-----BEGIN LICENSE-----
Application: EmailEngine
Licensed to: Your Company Name
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9abcdefghijklmnopqrstuvwxyz...
-----END LICENSE-----"
emailengine
Exported format:
export EENGINE_PREPARED_LICENSE="i0-AgqFsxFWFoWvEDGC7..."
emailengine
PEM format:
emailengine --preparedLicense="-----BEGIN LICENSE-----
Application: EmailEngine
Licensed to: Your Company Name
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9abcdefghijklmnopqrstuvwxyz...
-----END LICENSE-----"
Exported format:
emailengine --preparedLicense="i0-AgqFsxFWFoWvEDGC7..."
PEM format:
ENV EENGINE_PREPARED_LICENSE="-----BEGIN LICENSE-----\nApplication: EmailEngine\nLicensed to: Your Company\n\neyJhbGci...\n-----END LICENSE-----"
Exported format:
ENV EENGINE_PREPARED_LICENSE="i0-AgqFsxFWFoWvEDGC7..."
PEM format (multiline YAML):
services:
emailengine:
image: postalsys/emailengine:latest
environment:
EENGINE_PREPARED_LICENSE: |
-----BEGIN LICENSE-----
Application: EmailEngine
Licensed to: Your Company Name
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9abcdefghijklmnopqrstuvwxyz...
-----END LICENSE-----
Exported format (single-line):
services:
emailengine:
image: postalsys/emailengine:latest
environment:
- EENGINE_PREPARED_LICENSE=${LICENSE_KEY}
# .env
LICENSE_KEY=i0-AgqFsxFWFoWvEDGC7...
Verification
Check license status via API:
curl http://localhost:3000/v1/license \
-H "Authorization: Bearer YOUR_TOKEN"
Response:
{
"active": true,
"details": {
"application": "@postalsys/emailengine-app",
"key": "1edf01e35e75ed3425808eba",
"licensedTo": "Kreata OÜ",
"hostname": "emailengine.example.com",
"created": "2021-10-13T07:47:42.695Z"
},
"type": "EmailEngine License"
}
License Management
Update license:
- Change
EENGINE_PREPARED_LICENSEenvironment variable - Restart EmailEngine
The new license will be automatically applied on startup.
Remove license via API:
curl -X DELETE http://localhost:3000/v1/license \
-H "Authorization: Bearer YOUR_TOKEN"
See Also
- Prepared Settings - Pre-configure runtime settings
- Prepared Access Tokens - Pre-configure API access tokens
- License API - Programmatic license management
- Support & License - License information and policies