After updating to 0.20.0 no login (user does not exist)

I’ve been using Vikunja under Unraid as Docker for a while now. Today I did the update, and now I can’t log in anymore. The Vikunja frontend and also the app connect to my server, but I get the message “User does not exist”.

Unfortunately, I don’t know much about Docker, but maybe my Vikunja database is broken? I hope that this will not be overwritten when I update the container?

Yup having the same issue, unraid docker install

Have you been able to solve the problem yet? I would like to have a look at the database, maybe we have the same problem as described in this post (Unable to login after update from 0.18.1 to latest (guess 0.19.2)).

I use Adminer as Docker, but don’t know how to access the Vikunja database with it.

Nope, wouldn’t know where to start

I don’t know anything about unraid, so most of this is wild guesses.

Do you have a way to get a shell into the db container? I assume you have an overview of all running containers somewhere, maybe there’s an action for that?

Yes, I can start a console in each container. But I don’t have a separate database-container for Vikunja. I have installed the Vikunja-docker without any modifications, and it seems like it uses its own database inside this Vikunja-container (SQlite?)

When I start a console in the Vikunja-container and type “ls”, I see:

  • a folder “files”
  • a file “vikunja” (I guess it is a file, at least I cannot cd into it)
  • finally the database named “vikunja.db”

When I navigate to /files/config, the folder is empty.

If it’s using SQLite you should mount the db file to the host. Otherwise it won’t be persisted across restarts of the container. Similar for the files directory though that should persist it’s contents in a docker volume. Not sure how unraid handles these though.

Unraid forum thread: [Support] A75G Repo - Page 21 - Docker Containers - Unraid

In the meantime, all the problems that existed under Unraid have been solved.

If someone uses the Vikunja template from A75G under Unraid, I recommend the thread in the Unraid forum: Link

A thousand thanks to A75G for his patience and of course especially kolaente for this great app.

1 Like

Can you please show us how to mount the db file to the host in docker-compose.yml file?
Now every time I down and up the vikunja container, I lose all datas.

Can you share the docker-compose you are using? Vikunja supports multiple types of databases iirc, and the mount location is database-specific.

You can filter out the username and password if present.

Hi I am using the default sqlite database, and config.yml, and nginx.conf. here is my docker-compso.yml file.

version: '3'

services:
  api:
    image: vikunja/api
    container_name: vikunja_api
    restart: unless-stopped
    ports:
      - 127.0.0.1:3456:3456
    environment:
      - PUID=1001
      - PGID=1001
    volumes:
      - ./files:/app/vikunja/files
      - ./config.yml:/etc/vikunja/config.yml
      - vikunjadb:/app/vikunja/vikunja.db

  frontend:
    image: vikunja/frontend
    container_name: vikunja_frontend
    restart: unless-stopped

  proxy:
    image: nginx
    container_name: vikunja
    ports:
      - 127.0.0.1:8089:80
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - api
      - frontend
    restart: unless-stopped

volumes:
  vikunjadb:

networks:
  default:
    external: true
    name: npm-net

Do you get any messages like “Could not connect to db: could not open database file [uid=1001, gid=1001]: open ./vikunja.db: is a directory” when you run docker-compose up?

I’m trying to launch a version of this on my machine, but it looks like you’re trying to mount a folder as /app/vikunja/vikunja.db. This may reflect how you capture most databases (I’ll include mine for reference. It uses MySQL.), but an sqlite database is a file. you’d want to mount it the same way you would the config files, but with rw instead of ro.

Promised reference:

version: '2'
services:
  db:
    image: mariadb:10
    command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
    environment:
      MYSQL_ROOT_PASSWORD: imgladthispasswordisloggedinplaintext
      MYSQL_USER: vikunja
      MYSQL_PASSWORD: ifihadtomakeapassword
      MYSQL_DATABASE: vikunja
    volumes:
      - ./db:/var/lib/mysql
  api:
    image: vikunja/api:latest
    environment:
      VIKUNJA_DATABASE_HOST: db
      VIKUNJA_DATABASE_PASSWORD: <password>
      VIKUNJA_DATABASE_TYPE: mysql
      VIKUNJA_DATABASE_USER: vikunja
      VIKUNJA_SERVICE_FRONTENDURL: https://localhost:3456/
    volumes:
      - ./data:/app/vikunja/files
    ports:
      - 3456:3456
    depends_on:
      - db
    restart: on-failure
  frontend:
    image: vikunja/frontend:latest
    ports:
      - 80:80
    environment:
      VIKUNJA_API_URL: http://localhost:3456/api/v1
    restart: always

Try using a bind mount instead of mounting the volume directly.

For example:

version: '3'

services:
  api:
    image: vikunja/api
    container_name: vikunja_api
    restart: unless-stopped
    ports:
      - 127.0.0.1:3456:3456
    environment:
      - PUID=1001
      - PGID=1001
    volumes:
      - ./files:/app/vikunja/files
      - ./config.yml:/etc/vikunja/config.yml
      - ./vikunja.db:/app/vikunja/vikunja.db

  frontend:
    image: vikunja/frontend
    container_name: vikunja_frontend
    restart: unless-stopped

  proxy:
    image: nginx
    container_name: vikunja
    ports:
      - 127.0.0.1:8089:80
    volumes:
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - api
      - frontend
    restart: unless-stopped

networks:
  default:
    external: true
    name: npm-net

You’ll need to create the file on the host first (run touch vikunja.db in the same directory as the compose file).

Another option would be to put the vikunja db file in a folder (change VIKUNJA_DATABASE_PATH to something like /database and then mount /database to a volume) and then mount that with a docker volume, the one you tried first.

the first method works now, I never lose the data any more when I restart the container, thanks for your help.