Backup permissions

I use duplicati in a docker container for backing up all my docker containers. So I also like to use it for backing op vaultwarden.

I have configured a backup job in duplicati to backup the whole vw-data folder.
The issue I encounter is that the mapped user in the backup container can’t backup the path
/data/rsa_key.der and rsa_key.pem. This is because the permissions are set to 600 user root. The user that tries to backup is user Tom.

Are these files important to backup? And if so, what’s the proper way of fixing this permissions error?

You should try to set the environment variable --user to your specified user account on the host. This will run the docker container as that user, and all files Vaultwarden writes to the docker volume will be owned by the same user.
We utilize docker-compose for the service so it should look something like this;
version: ‘3’

services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
user: 1000:1000

More info here Running docker container with non root user · dani-garcia/vaultwarden Wiki · GitHub

1 Like