The License Server can be configured through a config.yaml file, environment variables, or a combination of both. Environment variables always take precedence over values in config.yaml. All environment variables use the LICENSE_ prefix.
The server binary includes commands to manage configuration:
# Generate a default config.yaml
./license-server config init --output config.yaml
# Display the current effective configuration
./license-server config show
# Validate the configuration file
./license-server config validate
# Get a specific configuration value
./license-server config get jwt.secret
The configuration file is organized into the following sections:
mode : production # production | development
license : /path/to/server.lic
driver : sqlite # sqlite | postgres
path : /app/data/license.db # SQLite path
host : postgres # PostgreSQL host
secret : "" # Required -- generate with: openssl rand -base64 32
encryption_key : "" # AES-256 encryption key
level : info # debug | info | warn | error
format : json # json | console
# Notification channel configuration
All configuration values can be set via environment variables. The naming convention is LICENSE_ followed by the section and key in uppercase, separated by underscores. For example, database.ssl_mode becomes LICENSE_DATABASE_SSL_MODE.
Variable Description LICENSE_JWT_SECRETJWT signing secret (generate with openssl rand -base64 32)
Variable Default Description LICENSE_SERVER_HOST0.0.0.0Bind address LICENSE_SERVER_HTTP_PORT5656HTTP port LICENSE_SERVER_GRPC_PORT50090gRPC port LICENSE_SERVER_MODEproductionServer mode (production, development) LICENSE_SERVER_LICENSE— Path to server license file
Variable Default Description LICENSE_DATABASE_DRIVERsqliteDatabase driver (sqlite, postgres) LICENSE_DATABASE_PATH/app/data/license.dbSQLite database path LICENSE_DATABASE_HOSTpostgresPostgreSQL host LICENSE_DATABASE_PORT5432PostgreSQL port LICENSE_DATABASE_NAMElicense_serverPostgreSQL database name LICENSE_DATABASE_USERlicensePostgreSQL user LICENSE_DATABASE_PASSWORD— PostgreSQL password LICENSE_DATABASE_SSL_MODEdisablePostgreSQL SSL mode
Variable Default Description LICENSE_SSL_ENABLEDfalseEnable TLS LICENSE_SSL_CERT_FILE— Server certificate file LICENSE_SSL_KEY_FILE— Server key file LICENSE_SSL_CA_FILE— CA certificate file LICENSE_GRACE_TOKEN_SECRET— Grace period token signing secret
Variable Default Description LICENSE_LDAP_ENABLEDfalseEnable LDAP authentication LICENSE_LDAP_HOST— LDAP server host LICENSE_LDAP_BIND_PASSWORD— LDAP bind password
Variable Default Description LICENSE_SMTP_HOST— SMTP server host LICENSE_SMTP_PORT587SMTP port LICENSE_SMTP_USERNAME— SMTP username LICENSE_SMTP_PASSWORD— SMTP password LICENSE_SMTP_FROM_ADDRESS— Sender email address
Variable Default Description LICENSE_BACKUP_ENABLEDtrueEnable automatic backups LICENSE_BACKUP_PATH/app/backupsBackup storage path LICENSE_BACKUP_ENCRYPTION_KEY— Backup encryption key (AES-256)
Variable Default Description LICENSE_LOGGING_LEVELinfoLog level (debug, info, warn, error) LICENSE_LOGGING_FORMATjsonLog format (json, console)
Environment variables always override values in config.yaml. This makes it straightforward to use a base configuration file and customize per environment:
# Use config.yaml as a base, but override the database driver and log level
LICENSE_DATABASE_DRIVER = postgres \
LICENSE_LOGGING_LEVEL=debug \
In Docker Compose, set overrides in the .env file or directly in the environment block:
image : git.prd.embidio.de/hive/license-server:v1.0.0
LICENSE_JWT_SECRET : ${LICENSE_JWT_SECRET}
LICENSE_DATABASE_DRIVER : postgres
LICENSE_DATABASE_HOST : postgres
LICENSE_DATABASE_PASSWORD : ${LICENSE_DATABASE_PASSWORD}
- ./config.yaml:/app/configs/config.yaml:ro