Skip to content

Troubleshoot login, mail, and TLS

Start locally with ./leonaid doctor, or use ./leonaid pilot-doctor ... --json for a pilot. Share the sanitised status, never .env contents, tokens, email addresses, or document bytes.

  • Docker unavailable: Start Docker or OrbStack and rerun doctor.
  • Login code missing: Check worker, outbox, and mail relay. Mailpit is local and starts only with the dev-mail profile. Use the latest message; codes are single-use and attempts are limited.
  • Too many attempts: Wait for the displayed cooldown. Do not bypass the rate limit or generic authentication response.
  • Local HTTPS: Use https://localhost:8443; port 8080 is diagnostic HTTP. Trust the local CA only in a controlled development environment.
  • Public TLS: Use Pilot Doctor to check DNS, hostname, full trust chain, security headers, and at least 14 days of certificate validity. Port 80 stays available for ACME and the HTTPS redirect.
  • Twenty CRM check fails: doctor (with the dev stack running) and the pilot-deploy/upgrade gates of Pilot Doctor ask the running API whether Twenty has the leonaidMatchKey field and accepts its integration key. Locally run ./leonaid provision-twenty; in a pilot run ./leonaid upgrade --twenty-bootstrap-file FILE. The check also counts records without a key; run repair-crm-match-keys to close that gap (pilot: pilot-repair-crm-match-keys --env-file FILE, which the leonaid-crm-repair timers run on schedule and which skips while maintenance mode is on).
  • No mail from the CRM (pilot): Twenty sends mail only with MAIL_SMTP_MODE=tls on port 465; with starttls it sends nothing on purpose and pilot-doctor warns about it. With tls, Twenty’s worker sends verification and password reset mail through the MAIL_SMTP_* relay over the mail-egress network. Check the twenty-worker logs for the SMTP error and that the relay certificate comes from a public CA.
  • CRM does not open (pilot): The CRM has no public domain. Run ./leonaid crm-admin --env-file FILE on the server and use the printed ssh -N -L command with the same local port; Twenty rejects other origins than http://localhost:TWENTY_ADMIN_PORT.
  • Writes return 503: Check infra/upgrade/maintenance.sh status. Disable maintenance only after dependencies are healthy and contracts pass.

For repeatable faults, record time, release SHA, service, and correlation ID. Retry write jobs only through their defined safe retry path.

If the HTTPS smoke fails after a Pages deployment, open the last green Documentation run from main, verify its manifest SHA, and rerun that exact workflow run. GitHub Pages atomically activates the newly produced artifact. Then verify the German and English entries, search, the language switch, and build-manifest.json. Never use a pull-request run as a rollback source.

The separate Documentation watchdog workflow opens a repository issue immediately when a main run fails. It also checks every six hours whether no successful publication has occurred for more than 30 hours, placing the intended alert before the 36-hour boundary. A successful recovery run closes the issue. The maintainer must enable notifications for repository issues.