Skip to main content

Troubleshooting

Common issues and solutions for self-hosted BillManager installations.

Container Won't Start

Check Logs

docker-compose logs billmanager

Common Errors

"JWT_SECRET_KEY or FLASK_SECRET_KEY must be set in production"

You need to set at least one secret key:

environment:
- FLASK_SECRET_KEY=your-generated-secret-here

Generate with:

openssl rand -hex 32

Database Connection Errors

Check the database container:

docker-compose logs db

Verify your DATABASE_URL is correct:

postgresql://USERNAME:PASSWORD@HOST:PORT/DATABASE

Lost Admin Password

Option 1: Reset via Database

Connect to the database:

docker exec -it billmanager-db-1 psql -U billsuser billmanager

Set the user to require password change on next login:

UPDATE users
SET password_change_required = true,
change_token = 'temp-reset-token'
WHERE username = 'admin';

Then use the forgot password flow or contact support.

Option 2: Fresh Start (Development Only)

Data Loss Warning

This deletes ALL data. Only use for development or fresh installations.

docker-compose down -v
docker-compose up -d
docker-compose logs billmanager | grep -A 5 "INITIAL ADMIN CREDENTIALS"

A new random password will be generated.

Email Issues

"Invite User" Button Not Visible

Email is not configured. Add these environment variables:

environment:
- RESEND_API_KEY=re_your_api_key
- [email protected]
- APP_URL=https://your-billmanager-url.com

Restart the container after adding them.

Emails Not Received

  1. Check Resend Dashboard - View delivery status at resend.com
  2. Verify FROM_EMAIL - Must match a verified domain in Resend
  3. Check Spam Folders - Emails may be filtered
  4. Verify APP_URL - Links in emails use this URL

Invalid API Key

  • Ensure the key starts with re_
  • Check for extra whitespace
  • Verify it hasn't been revoked in Resend dashboard

Performance Issues

Slow Response Times

  1. Check available memory:

    docker stats billmanager
  2. Check database size:

    docker exec billmanager-db-1 psql -U billsuser billmanager -c "SELECT pg_size_pretty(pg_database_size('billmanager'));"
  3. Consider increasing container resources in docker-compose.yml

High Memory Usage

Add memory limits:

services:
billmanager:
deploy:
resources:
limits:
memory: 512M

Database Issues

Check Database Health

docker-compose exec db pg_isready -U billsuser

View Database Size

docker exec billmanager-db-1 psql -U billsuser billmanager -c "\dt+"

Reset Database (Development Only)

Data Loss Warning

This permanently deletes all data.

docker-compose down -v
docker-compose up -d

Social Login Issues

Login Buttons Not Appearing

  • The provider is not enabled. Set OAUTH_GOOGLE_ENABLED=true (or the relevant provider) and restart the container.
  • Required credentials are missing. Check container logs for OAuth provider warnings.

"Provider not enabled" Error After Clicking Login Button

  • The environment variables are set but the container hasn't been restarted since adding them.
  • Restart the container: docker-compose restart billmanager

"Failed to fetch provider configuration" Error

  • BillManager couldn't reach the provider's discovery endpoint.
  • Check that the container has internet access.
  • For Apple/Google, verify the provider credentials are correct and the container can reach the provider.

Redirect URI Mismatch Error (from the provider)

The callback URL registered with the provider doesn't match what BillManager is sending.

  • The correct callback URL is: {APP_URL}/auth/callback
  • Check that APP_URL is set correctly (including https://)
  • Ensure the redirect URI in the provider's configuration matches exactly

Social Login Creates New Account Instead of Linking

  • The user's provider email doesn't match their BillManager email.
  • If the user already has an account, they should log in with their password first, then link the social account from Admin Panel → Security → Linked Accounts.
  • The user signed up via social login and has no password set.
  • They must set a password first before unlinking their social account.

Two-Factor Authentication Issues

2FA Option Not Visible

  • 2FA is not enabled. Set ENABLE_2FA=true and restart the container.

Verification Codes Not Arriving

  • Check that email is configured (see Email Setup).
  • Verify the user has a valid email address on their account.
  • Check the Resend dashboard for delivery status.

Passkey Registration Fails Silently

  • WEBAUTHN_RP_ID must match the domain in the browser's address bar exactly (no scheme, no port).
  • WEBAUTHN_ORIGIN must match the full origin including scheme (e.g., https://bills.yourdomain.com).
  • WebAuthn requires HTTPS in production. It only works over HTTP on localhost.

"2FA session expired" Error

  • The 2FA challenge has a 5-minute time limit. If the user takes too long to enter their code, they need to start the login process again.

Locked Out of Account (Lost 2FA Access)

If a user has lost access to their email and recovery codes:

  1. An admin can disable 2FA directly in the database:
    docker exec -it billmanager-db-1 psql -U billsuser billmanager
    UPDATE twofa_config SET is_enabled = false WHERE user_id = (
    SELECT id FROM users WHERE username = 'the-username'
    );
  2. The user can then log in normally and re-enable 2FA from Admin Panel → Security.

Getting Help

If you can't resolve an issue:

  1. Search existing issues on GitHub
  2. Open a new issue with:
    • BillManager version (docker-compose logs billmanager | head -20)
    • Docker and Docker Compose versions
    • Relevant error messages from logs
    • Steps to reproduce the issue