#Some environment variables do not work.
1 messages · Page 1 of 1 (latest)
Short answer: you need to set the webapp’s environment variables in the webapp container’s environment (the .env used by docker compose for the webapp), then restart that service. It won’t pick up env meant for tasks or other services.
Checklist:
- Put EMAIL_TRANSPORT, SMTP_HOST/PORT/SECURE/USER/PASSWORD (or Resend/AWS SES) and WHITELISTED_EMAILS in the webapp’s .env that docker compose loads for the webapp stack. [Webapp env; Docker auth]
- Bring the webapp back up to apply changes: docker compose up -d (from hosting/docker/webapp). [Docker setup]
- If you don’t set EMAIL_TRANSPORT, magic links are only printed in webapp logs and not sent. [Docker auth; Troubleshooting]
- WHITELISTED_EMAILS blocks sign-ups/logins that don’t match the regex across all auth methods; ensure your regex is escaped correctly and the var is present in the webapp env. [Webapp env; Docker auth]
If you’re running split services, make sure the vars are set on the webapp machine’s compose env (not the worker’s), and then restart only the webapp stack. [Split services]
To debug:
- Check webapp logs for magic link output and any SMTP errors: docker compose logs -f webapp. [Troubleshooting]
- Verify the variables show up inside the webapp container (e.g., printenv) after restart.