Troubleshooting
Diagnose and fix common self-hosting issues
Run the Doctor
The fastest way to diagnose issues is the built-in doctor command:
npx @yavio/cli doctorThis checks Node.js version, Docker availability, config files, service connectivity, TLS warnings, and port conflicts.
Common Issues
Services fail to start
Symptoms: docker compose up -d exits with errors, or containers restart in a loop.
Check logs:
npx @yavio/cli logs # All services
npx @yavio/cli logs ingest # Single serviceCommon causes:
- Missing
.envfile — Run./scripts/setup-env.shto generate one - Empty secrets — Ensure
NEXTAUTH_SECRET,JWT_SECRET,API_KEY_HASH_SECRET, andENCRYPTION_KEYare all set - Port conflicts — Another process is using port 3000, 3001, 5432, or 8123. Check with
lsof -i :3000(macOS/Linux) or change ports via environment variables (see Configuration)
Dashboard shows "unhealthy"
Check the dashboard logs:
npx @yavio/cli logs dashboardCommon causes:
NEXTAUTH_URLmismatch — Must match the URL you access the dashboard at. If you use a custom domain, updateNEXTAUTH_URLandAPP_URLin.env- Database not ready — The dashboard depends on PostgreSQL. Ensure the postgres container is healthy:
docker compose ps
Events not appearing in dashboard
Symptoms: SDK reports no errors, but the dashboard shows no data.
- Check the ingestion API is reachable:
curl http://localhost:3001/healthShould return {"status":"ok"}.
-
Check
API_KEY_HASH_SECRETmatches — The dashboard and ingestion API must share the sameAPI_KEY_HASH_SECRET. If they differ, API keys generated in the dashboard won't authenticate against the ingestion API. -
Check your SDK endpoint — Ensure your
.yaviorc.jsonorwithYavio()config points tohttp://localhost:3001/v1/events(not justhttp://localhost:3001). -
Check the SDK is not in no-op mode — Without a valid API key, the SDK silently discards events. See SDK Troubleshooting.
ClickHouse out of memory
ClickHouse defaults to using available system memory. In the production compose overlay, it's capped at 4 GB. If you hit memory issues:
- Use the production overlay:
npx @yavio/cli up --prod- Or set a custom limit in your compose file:
services:
clickhouse:
deploy:
resources:
limits:
memory: 2GPort already in use
Check which process is using the port:
# macOS / Linux
lsof -i :3000
# Or change the port
DASHBOARD_PORT=8080 docker compose up -dSee Configuration for all port variables.
Resetting everything
If you want to start fresh, wipe all data and reinitialize:
npx @yavio/cli resetTo preserve your workspace and user data while only clearing analytics events:
npx @yavio/cli reset --keep-configreset permanently deletes data. There is no undo.
Getting Help
If you're stuck, open an issue at github.com/yavio-ai/yavio/issues with the output of npx @yavio/cli doctor and relevant logs.