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_URLto be set (matching the exact origin you visit in the browser), and both passkeys and Service Workers require HTTPS (orlocalhost). - Fix: Place torq behind a reverse proxy or Cloudflare Tunnel with HTTPS and set
TORQ_BASE_URL=https://torq.example.comwithout 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.1or172.17.0.1) instead of real client IPs. - Cause:
TORQ_TRUSTED_PROXIESis empty or does not include your proxy's IP/subnet, so torq ignoresX-Forwarded-For. - Fix: Set
TORQ_TRUSTED_PROXIESto the CIDR of your reverse proxy (e.g.127.0.0.1/32for host-networked Caddy/Nginx, or your Docker bridge subnet172.16.0.0/12). Ensure your proxy forwardsX-Forwarded-ForandX-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.dbwithout/data/secret.key. Restoresecret.keyfrom 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
- Check Settings → Email server for the last error and the recent delivery log.
- Verify
TORQ_BASE_URLis set — password reset and confirmation links are disabled without it. - For Password reset, verify the user's email address is marked Confirmed under Settings → Users (unconfirmed addresses receive reminder emails, but never reset links).
- 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(default25) is smaller than the file, or your reverse proxy's body size limit (such as Nginx's default1 MBclient_max_body_size) is blocking the request before it reaches torq. - Fix: Increase
client_max_body_sizein Nginx (or equivalent in your proxy) and adjustTORQ_MAX_UPLOAD_MBif 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.