# HealthTrack configuration # Copy to .env (docker compose) or set as container environment variables. # Every variable except APP_URL is optional. # Absolute URL users browse to — REQUIRED for login/auth callbacks to work. # Must match exactly what's in the address bar (scheme, host, port). # Behind a reverse proxy, use the public HTTPS URL. # # Serve the app on ONE public hostname. If your proxy answers on both # example.com and www.example.com, pick one here and redirect the other to it: # auth cookies are scoped to the host that set them while OAuth redirect URIs # come from APP_URL, so starting on the other hostname breaks Google sign-in # with ?error=state_mismatch. The app redirects page requests to this hostname # to cover the common case (/api/ routes, localhost and LAN IPs are exempt). APP_URL=http://localhost:3000 # Session signing secret. Leave unset — one is auto-generated into # /data/keys on first start. Set only to manage it yourself (64 hex chars). #AUTH_SECRET= # Key used to encrypt stored OAuth tokens (Oura). Leave unset — auto-generated # into /data/keys on first start. #ENCRYPTION_KEY= # Registration policy. Default (unset): INVITE-ONLY — the very first account # registers freely and becomes admin; after that, new accounts need a # single-use invite link (Settings → Invites). Set to "true" to open # registration to anyone, or "false" to close it completely (invites too). #SIGNUPS_ENABLED= # --- Optional integrations (features hide in the UI when unset) --- # Anthropic API key — enables AI features: health summaries, natural-language # queries, medication interaction checks, lab/vaccine PDF parsing. #ANTHROPIC_API_KEY= # Optional: override the Claude model used for REASONING features (health # summaries, natural-language queries, interaction checks). Defaults to the # current Sonnet generation; set claude-opus-4-8 for maximum intelligence. # See https://docs.claude.com/en/docs/about-claude/models #ANTHROPIC_MODEL=claude-sonnet-5 # Optional: override the model used for EXTRACTION (lab/vaccine PDF parsing — # mechanical transcription). Defaults to the current Sonnet generation; a # cheaper model such as claude-haiku-4-5 usually performs fine here. #ANTHROPIC_MODEL_EXTRACTION=claude-sonnet-5 # Google OAuth — enables "Sign in with Google". # Authorized redirect URI: /api/auth/callback/google #GOOGLE_CLIENT_ID= #GOOGLE_CLIENT_SECRET= # Oura OAuth — enables Oura Ring sync (sleep, heart rate, activity). # Redirect URI: /api/oura/callback #OURA_CLIENT_ID= #OURA_CLIENT_SECRET= # Oura sync runs once at startup and every 4 hours. Set false to disable the # in-process scheduler; the manual Settings sync remains available. #OURA_SYNC_ENABLED=true #OURA_SYNC_INTERVAL_HOURS=4 # --- Health Connect ingestion (Android phone relay) --- # Maximum accepted webhook body, in BYTES. Deliveries larger than this are # rejected with 413. Default: 2097152 (2 MiB). #HEALTH_CONNECT_MAX_BODY_BYTES=2097152 # Development escape hatch ONLY: accept webhook deliveries that carry no # X-Signature header, so you can curl the endpoint locally. Ignored when # NODE_ENV=production — a production instance ALWAYS requires the signature. # A signature that IS present is verified in every environment. #HEALTH_CONNECT_ALLOW_UNSIGNED=false # --- Container conventions --- # File ownership inside /data (Unraid defaults shown). #PUID=99 #PGID=100 # IANA timezone for the container and Oura calendar-date sync windows. # Invalid identifiers fail the Oura sync instead of silently using UTC. #TZ=Etc/UTC # --- Development only --- # Where local dev state lives (SQLite db, uploads, keys). Defaults to ./data. #DATA_DIR=./data