Encrypted packages (databases, PKI, client profiles) with safe restore and a pre-restore safety copy, usable for server-to-server migration across container and system-service installs. New Management page, ovp_backups volume, migrations code in the profiler image, server name in package names. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2.5 KiB
Configuration
Each component reads config.ini (shipped in APP_CORE/ and APP_PROFILER/); any value can be overridden by an environment variable OVPMON_{SECTION}_{KEY}. The installation scripts write the environment for you, so a newcomer normally changes nothing here.
Variables
| Variable | Purpose |
|---|---|
OVPMON_API_SECRET_KEY |
JWT signing key shared by both APIs (must be random; changing it logs everybody out; keep it across updates) |
OVPMON_INITIAL_ADMIN_USER / _PASSWORD |
one-time seed of the first administrator (only while the users table is empty); the scripts remove it after the first start |
OVPMON_CORS_ORIGINS |
extra allowed CORS origins, comma-separated (empty = same-origin only) |
OVPMON_OPENVPN_MONITOR_DB_PATH |
monitoring database |
OVPMON_PROFILER_DB_PATH |
profiler database |
OVPMON_OPENVPN_MONITOR_LOG_PATH |
path of openvpn-status.log |
OVPMON_LOGGING_LEVEL |
INFO / DEBUG |
OVPMON_BACKUP_LOCAL_ROOT |
root of the local backup destinations (default /var/lib/ovpmon/backups; containers: /app/backups); other backup variables: Backup and Restore |
JWT signing key rule
The key comes from OVPMON_API_SECRET_KEY or, when the variable is not set, from [api] secret_key in config.ini (the variable wins). There is no built-in default: the shipped config.ini files have an empty value. A key is accepted when it is not blank, does not contain change-me or changeme (any case) and has at least 32 characters (openssl rand -hex 32 gives 64). With a missing or weak key both APIs refuse to start: they log a critical message (never the key itself) naming the reason and the source, and exit with code 1. Both APIs must get the same key. OVPMON_SECRET_KEY (a name used by older guides) is not read; if it is set instead of OVPMON_API_SECRET_KEY, the message says to rename it.
Where the values are set
| Installation method | File | Reference |
|---|---|---|
| Containers | .env next to the compose files (JWT_SECRET is mapped to OVPMON_API_SECRET_KEY) |
Containers: reference |
| System services | /etc/ovpmon/env (root:root, mode 600) plus /etc/ovpmon/helper.conf for the root helper |
System services: reference |
The OpenVPN server settings (port, network, routes, DNS, PKI parameters) are not set here: they are edited in the UI (VPN and PKI pages) and validated before use.