Postgres password authentication error in logs

I have started up a new Vikunja Docker container with OpenID enabled via Authelia. The login the web UI seem to work, but I periodically get server error popups. The container log periodically complains about password authentication errors:

    time=2025-09-15T16:09:00.038Z
    level=ERROR
    msg=[Empty openid Team Cleanup Cron] Error removing empty openid team: pq: password authentication failed for user \"vikunja\"

    time=2025-09-15T16:09:00.039Z
    level=ERROR
    msg=[Add Task To Filter View Cron] Error fetching filters: pq: password authentication failed for user \"vikunja\"

The passwords in my Docker compose match between the two containers and don’t have any special characters.

networks:
  swagger:
    external: true

services:
  vikunja:
    image: vikunja/vikunja
    container_name: vikunja
    environment:
      VIKUNJA_SERVICE_PUBLICURL: https://vikunja.example.com
      VIKUNJA_DATABASE_HOST: db
      VIKUNJA_DATABASE_PASSWORD: [my_password]
      VIKUNJA_DATABASE_TYPE: postgres
      VIKUNJA_DATABASE_USER: vikunja
      VIKUNJA_DATABASE_DATABASE: vikunja
      VIKUNJA_SERVICE_JWTSECRET: [my_secret]
    ports:
      - 3456:3456
    volumes:
      - ./files:/app/vikunja/files
      - ./config.yml:/etc/vikunja/config.yml #only used for OpenID auth
    networks:
      - swagger
    depends_on:
      db:
        condition: service_healthy
    restart: unless-stopped
  db:
    image: postgres:17
    environment:
      POSTGRES_PASSWORD: [my_password]
      POSTGRES_USER: vikunja
      POSTGRES_DB: vikunja
    volumes:
      - ./db:/var/lib/postgresql/data
    networks:
      - swagger
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -h localhost -U $$POSTGRES_USER"]
      interval: 2s
      start_period: 30s

No idea what the issue is. Any advice appreciated :slight_smile:

I figured out the problem, I had another container that used a postgres service named ‘db’ and so that and Vikunja were getting confused between the two. I renamed ‘db’ to ‘vikunja-db’ in the Docker compose file and all is well now.