Docker+Admin can't administer instance (e.g. reset a user's password) #2059

Closed
opened 2026-03-22 13:53:46 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @violet4 on GitHub (Jan 1, 2025).

Description

Docker+Admin can't administer instance (e.g. reset a user's password)

i have installed Vikunja using Docker. my partner created an account recently but forgot to save her credentials. as admin, i wanted to get her back into her account.

from a web search i ended up at https://community.vikunja.io/t/how-to-manage-users-in-self-hosted-instance/1062

the suggestion there is to use vikunja users cli commands.

root@msi:/home/violet# docker exec -it 195a9718f5f4 vikunja users
OCI runtime exec failed: exec failed: unable to start container process: exec: "vikunja": executable file not found in $PATH: unknown

it seems the container doesn't have the cli tools installed or that i can't figure out how to access them properly.

i can't get a shell/dash/bash in the container with any docker container user. it appears that the docker container is heavily stripped down, which is great for security, but from my perspective/understanding, has no mechanisms for administration in the UI or elsewhere.

v0.24.6

docker-compose

services:  
  vikunja:
    image: vikunja/vikunja
    environment:
      VIKUNJA_SERVICE_JWTSECRET: '...'
      VIKUNJA_SERVICE_PUBLICURL: ...
      # Note the default path is /app/vikunja/vikunja.db.
      # This config variable moves it to a different folder so you can use a volume and 
      # store the database file outside the container so state is persisted even if the container is destroyed.
      VIKUNJA_DATABASE_PATH: /db/vikunja.db
    ports:
      - 3456:3456
    volumes:
      - /mnt/docker_drive/docker/vikunja/data:/app/vikunja/files
      - /mnt/docker_drive/docker/vikunja/db:/db
    restart: unless-stopped

docker image:

  • vikunja/vikunja:latest
  • sha256:cec159e222f578ece7447b56cb451178b13da2903c403ef26bea00c30e42c30f

Vikunja Version

v0.24.6

Browser and version

No response

Can you reproduce the bug on the Vikunja demo site?

No

Screenshots

No response

Originally created by @violet4 on GitHub (Jan 1, 2025). ### Description ## Docker+Admin can't administer instance (e.g. reset a user's password) i have installed Vikunja using Docker. my partner created an account recently but forgot to save her credentials. as admin, i wanted to get her back into her account. from a web search i ended up at https://community.vikunja.io/t/how-to-manage-users-in-self-hosted-instance/1062 the suggestion there is to use `vikunja users cli commands`. ``` root@msi:/home/violet# docker exec -it 195a9718f5f4 vikunja users OCI runtime exec failed: exec failed: unable to start container process: exec: "vikunja": executable file not found in $PATH: unknown ``` it seems the container doesn't have the cli tools installed or that i can't figure out how to access them properly. i can't get a shell/dash/bash in the container with any docker container user. it appears that the docker container is heavily stripped down, which is great for security, but from my perspective/understanding, has no mechanisms for administration in the UI or elsewhere. v0.24.6 `docker-compose` ```yaml services: vikunja: image: vikunja/vikunja environment: VIKUNJA_SERVICE_JWTSECRET: '...' VIKUNJA_SERVICE_PUBLICURL: ... # Note the default path is /app/vikunja/vikunja.db. # This config variable moves it to a different folder so you can use a volume and # store the database file outside the container so state is persisted even if the container is destroyed. VIKUNJA_DATABASE_PATH: /db/vikunja.db ports: - 3456:3456 volumes: - /mnt/docker_drive/docker/vikunja/data:/app/vikunja/files - /mnt/docker_drive/docker/vikunja/db:/db restart: unless-stopped ``` docker image: * `vikunja/vikunja:latest` * `sha256:cec159e222f578ece7447b56cb451178b13da2903c403ef26bea00c30e42c30f` ### Vikunja Version v0.24.6 ### Browser and version _No response_ ### Can you reproduce the bug on the Vikunja demo site? No ### Screenshots _No response_
Author
Owner

@deurk commented on GitHub (Jan 2, 2025):

The container does contain the CLI tools, you just have to give the correct path to the binary, as stated in the CLI doc (https://vikunja.io/docs/cli)

docker exec <name of the Vikunja container> /app/vikunja/vikunja <subcommand>
so in your case
docker exec -it 195a9718f5f4 /app/vikunja/vikunja users

@deurk commented on GitHub (Jan 2, 2025): The container does contain the CLI tools, you just have to give the correct path to the binary, as stated in the CLI doc (https://vikunja.io/docs/cli) `docker exec <name of the Vikunja container> /app/vikunja/vikunja <subcommand>` so in your case `docker exec -it 195a9718f5f4 /app/vikunja/vikunja users`
Author
Owner

@violet4 commented on GitHub (Jan 6, 2025):

thank you for your response! my mistake. i wasn't able to run any simple commands such as ls, echo, bash, sh, etc etc, so i had given up and believed it was likely entirely stripped.

i was able to use the command as you suggested and it worked great (.../vikunja user rather than .../vikunja users).

regarding docs, i had referenced:

since i had discovered the vikunja command from that forum/discussion link, it didn't occur to me to reference back to the docs to look for something such as "cli" (https://vikunja.io/docs/cli). oh well.

thanks again!

@violet4 commented on GitHub (Jan 6, 2025): thank you for your response! my mistake. i wasn't able to run any simple commands such as ls, echo, bash, sh, etc etc, so i had given up and believed it was likely entirely stripped. i was able to use the command as you suggested and it worked great (`.../vikunja user` rather than `.../vikunja users`). regarding docs, i had referenced: * https://vikunja.io/docs/full-docker-example * https://vikunja.io/docs/installing/#docker since i had discovered the `vikunja` command from that forum/discussion link, it didn't occur to me to reference back to the docs to look for something such as "cli" (https://vikunja.io/docs/cli). oh well. thanks again!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#2059