Troubleshooting
Services Are Unhealthy or Not Starting
docker compose ps
docker compose logs --tail=50 authsec
docker compose logs --tail=50 hydra
docker compose logs --tail=50 postgres
Common causes:
- Missing required env vars (
JWT_DEF_SECRET,DB_PASSWORD, and related keys) hydra-migratefailed (docker compose logs hydra-migrate)- Slow host startup timing for Postgres
Database Connection Refused
docker compose ps postgres
docker compose exec authsec wget -qO- http://postgres:5432 || echo "port open"
docker compose exec postgres psql -U authsec -d kloudone_db -c "SELECT 1"
CORS Errors
Make sure CORS_ALLOW_ORIGIN exactly matches your frontend origin (no trailing slash):
CORS_ALLOW_ORIGIN=http://localhost:3000
WebAuthn or Passkeys Failing
WEBAUTHN_RP_IDmust be hostname only (no scheme and no port)WEBAUTHN_ORIGINmust be full origin- HTTPS is required for non-localhost hostnames
Hydra OAuth2 Flow Errors
curl http://localhost:4444/health/ready
docker compose logs hydra
docker compose exec hydra wget -qO- http://authsec:7468/authsec/uflow/health
Ports 80/443 Already in Use
sudo lsof -i :80
sudo lsof -i :443
docker compose up -d nginx