Troubleshooting
Start by preserving logs and the current release/image information before changing services:
koakademy statusdocker service ps --no-trunc koakademy_appdocker service logs --tail=200 koakademy_appdocker service logs --tail=100 koakademy_caddydocker service logs --tail=100 koakademy_postgresNever publish Docker Secrets, database dumps, student data, or unredacted production logs.
Installation or certificate failure
Section titled “Installation or certificate failure”Confirm the domain resolves to the VPS and ports 80/443 are free. Caddy needs both ports to obtain and renew certificates:
ss -ltnp '( sport = :80 or sport = :443 )'docker service logs --tail=200 koakademy_caddyThe installer fails rather than overwriting legacy koakademy-* services. Follow Deployment on a fresh host or during a planned migration window.
App does not become healthy
Section titled “App does not become healthy”Check the migration job, private dependencies, and application task:
docker service ps --no-trunc koakademy-migrate-<timestamp>docker service ps --no-trunc koakademy_postgresdocker service ps --no-trunc koakademy_redisdocker service ps --no-trunc koakademy_gotenbergdocker service logs --tail=200 koakademy_appCommon causes are a failed migration, insufficient memory, a full volume, or unavailable Docker registry access. Do not delete volumes while diagnosing.
Update failure
Section titled “Update failure”koakademy update creates a PostgreSQL dump before migrations. It does not silently roll back code after a migration because schema reversal can lose data. Inspect the release notes, task logs, and backup path printed by the command. Use koakademy rollback only after confirming the prior code supports the new schema; otherwise restore the database and image together.
Provider configuration failure
Section titled “Provider configuration failure”Run the relevant configuration command again and check the app task after the rollout:
koakademy configure storage r2koakademy configure mail smtpkoakademy configure search enabledocker service logs --tail=200 koakademy_appProvider credentials are Docker Secrets and are intentionally not printable. Verify endpoint, bucket, allowed network access, and provider-side permissions instead of attempting to inspect secret values.
Manual Compose
Section titled “Manual Compose”For the supported manual Compose topology:
docker compose --env-file .env -f compose.production.yaml config --quietdocker compose --env-file .env -f compose.production.yaml psdocker compose --env-file .env -f compose.production.yaml logs --tail=200 appcurl --verbose http://127.0.0.1:8000/upRestart the app after a configuration change so FrankenPHP workers use the new environment.