Skip to main content

Troubleshooting

Common issues when self-hosting torq and how to resolve them.

Passkeys or PWA install are unavailable​

  • Symptom: Settings → Sign-in & security says passkeys are unavailable, or Chrome/Safari won't install torq as a full PWA.
  • Cause: Passkeys require TORQ_BASE_URL to be set (matching the exact origin you visit in the browser), and both passkeys and Service Workers require HTTPS (or localhost).
  • Fix: Place torq behind a reverse proxy or Cloudflare Tunnel with HTTPS and set TORQ_BASE_URL=https://torq.example.com without a trailing slash. See Two-factor sign-in and Using torq on your phone.

Login throttling blocks everyone behind a reverse proxy​

  • Symptom: One user's failed logins rate-limit other users, or Settings → Devices shows the proxy's IP (127.0.0.1 or 172.17.0.1) instead of real client IPs.
  • Cause: TORQ_TRUSTED_PROXIES is empty or does not include your proxy's IP/subnet, so torq ignores X-Forwarded-For.
  • Fix: Set TORQ_TRUSTED_PROXIES to the CIDR of your reverse proxy (e.g. 127.0.0.1/32 for host-networked Caddy/Nginx, or your Docker bridge subnet 172.16.0.0/12). Ensure your proxy forwards X-Forwarded-For and X-Forwarded-Proto.

Authenticator (TOTP) codes are rejected or stopped working​

  • Code rejected immediately after setup: Check that your phone's clock is set to automatic network time (NTP). TOTP codes depend on accurate UTC time.
  • Codes stopped working after restoring a backup: You likely restored /data/torq.db without /data/secret.key. Restore secret.key from the same backup, or sign in with a recovery code and re-enroll TOTP.
  • Locked out of the last administrator account: See the emergency SQLite recovery procedure.

Emails or password resets aren't arriving​

  1. Check Settings → Email server for the last error and the recent delivery log.
  2. Verify TORQ_BASE_URL is set — password reset and confirmation links are disabled without it.
  3. For Password reset, verify the user's email address is marked Confirmed under Settings → Users (unconfirmed addresses receive reminder emails, but never reset links).
  4. If using Gmail or Microsoft 365, ensure you use an App Password (Gmail) or have Authenticated SMTP enabled (Microsoft 365).

QR code labels open localhost on my phone​

  • Symptom: Scanning a printed QR code fails on your phone because it points to http://localhost:8080/....
  • Fix: QR codes encode the address currently open in your browser. Open torq via its LAN IP or public https:// URL before downloading or printing labels. See QR codes.

Large photo or PDF uploads fail (413 error)​

  • Cause: Either TORQ_MAX_UPLOAD_MB (default 25) is smaller than the file, or your reverse proxy's body size limit (such as Nginx's default 1 MB client_max_body_size) is blocking the request before it reaches torq.
  • Fix: Increase client_max_body_size in Nginx (or equivalent in your proxy) and adjust TORQ_MAX_UPLOAD_MB if needed.

Rollback fails with a database schema error​

  • Cause: Schema migrations only move forward, so an older torq image refuses to start against a database migrated by a newer release.
  • Fix: Stop torq, restore the matching pre-upgrade copy from /data/backups/ (or your own backup), and then start the older image. See Data and backups.