Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
3.9 KiB
3.9 KiB
Containers: troubleshooting and security
Install: Containers. Update and backup: Operations.
Troubleshooting
| Symptom | Cause and action |
|---|---|
port 80/tcp is already in use |
Another service uses the port. Install with --http-port 8080 or set OVPMON_HTTP_PORT in .env (same for OVPMON_VPN_PORT) |
container 'ovp-...' of the OTHER variant is running |
Variants A and B cannot run together. Stop the other stack first |
OVPMON_CSP_CONNECT_EXTRA ... is invalid (script) or check-csp-connect-extra in the log of a container that stops at start |
The value is not a list of origins. Use https://host[:port] or http://host[:port] separated by spaces (no ;, quotes, commas, paths, leading space) or leave it empty |
container 'ovp-ui' ... belongs to compose project 'x' |
A stack of another project uses the fixed names. Use --project x or remove that stack |
| Health check does not turn healthy | docker compose ps, then docker compose logs --tail 100 <service> (A: docker logs ovp-allinone). The scripts print the last log lines of failing services. The profiler allows 40 s and the all-in-one container 60 s before failures count |
FATAL: ... newer than this version / migration "too new" |
The database was migrated by a newer release. Do not start the old version on it: update to the newer sources, or restore a matching backup (update.sh --rollback or restore.sh) |
| Migration failed | Nothing was started and the volumes are restored by the automatic rollback. The report names the migration; the database copy <db>.bak-* is in db_data. Send the report with the problem |
JWT_SECRET must be set in .env |
.env missing or empty value; run install.sh or add JWT_SECRET=$(openssl rand -hex 32) |
JWT_SECRET in .env is too short / a placeholder/default value (the all-in-one container: FATAL: JWT_SECRET is ...; a service exits with Refusing to start) |
The signing key is weak (under 32 characters or contains change-me/changeme). Set JWT_SECRET=$(openssl rand -hex 32) in .env and run the script again; all users must then sign in again |
permission denied on docker |
Run as root or add the user to the docker group. Backups belong to the user that runs the scripts |
| Permission errors on bind mounts on SELinux hosts | Backup and restore bind-mount backups/ into a container; label the directory for containers (chcon -Rt container_file_t backups) |
Cannot pull alpine:3 (offline) |
Make an image with sh, tar and sha256sum available locally and set OVPMON_BACKUP_IMAGE; use --no-pull with update.sh |
/dev/net/tun missing |
Load the module on the host (modprobe tun); the compose files map the device |
| VPN does not start after an update | The containers were recreated and the profiler starts OpenVPN only on request: start the server in the UI. Check that the server configuration exists (ovp_config volume) |
| The UI answers 502 right after start | The APIs are still starting; wait for the health checks |
Security
- Put TLS in front of the UI (reverse proxy or a certificate in nginx): the container serves plain HTTP. See Nginx configuration.
.envholds the signing secret: mode 600, owned by the operator, never committed (.gitignorelists it). The scripts never printJWT_SECRET; the generated administrator password is shown once and removed from.envafter the first start.- Backups contain the PKI (CA and server private keys), the databases (password hashes, 2FA secrets) and a copy of
.env: keep them mode 700/600 and store off-host copies encrypted. - The profiler container is privileged for networking (
NET_ADMIN, TUN). Variant A runs everything in that one container; its APIs listen on127.0.0.1only, so only nginx (80) and OpenVPN (1194/udp) are reachable. - No secrets in logs: the scripts only log names and paths; the services log the source of the secret, not its value.