Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upBitwarden server does not work with Podman #497
Comments
|
Looks like you do not have permissions to map volumes to the host. Maybe you need to run with sudo? |
|
Yeah that was the weird part, tried both with sudo and as root. Though I spotted I run an unsupported build of Docker, maybe that is playing up. Will look into it when I get a chance |
|
Yep, that was the case. Outdated Docker was the issue, switched to Podman while I was at it. Thanks anyhow, appreciate the help :) |
|
Getting a different error now running podman 1.1.2
|
|
Same issue with: |
|
Since Podman has replaced Docker in Fedora and can run Docker containers if setup correctly. Can the container files and scripts be updated to work better with non-root containers? |
|
This is most likely SELinux issues, would Bitwarden be interested in optimizing their docker compose to work better with SELinux? Might even be as simple as adding |
|
@SpyTec I do not know much about SELinux, so I would be interested in knowing what the issues here are and what the fix would be. |
|
I'm unable to experiment with the SELinux has contexts for processes and files which locks files down depending on where the files are located or what contexts the processes are given. Podman works a bit differently than Docker in that it by default runs non-root inside the container, and it also has security enhancements which might it difficult to run Docker commands under Podman instead. I'm presuming that the volume mounted under Docker works fine as it runs as root-user inside the container, but as soon as we use Podman and Podman-Docker bridge we run into SELinux context issues as it's running as non-root. Adding So instead of |
|
We do not run under root in the containers. We step down to a |
|
Did you try disabling SELinux first ? |
|
@Mart124 the problem is SELinux in the containers, not on my machine. Bitwarden needs to be changed to work with Podman. Running I've gone with bitwarden_rs however, as it allowed me to change container settings. Official Bitwarden was a bit of a mess for me to configure locally with all the different containers and generated docker-composes |
|
+1 for me. We are in the process of start using the enterprise version. It should be hosted on Redhat EL8 which does come with podman and not docker. Willing to test! |
|
I'd be willing to write some code to get this working just point me in the right direction |
|
Hi, I'm using bitwarden server with docker. If selinux is disabled, all is fine, but when enabled, I'm having lots of log permission denied issues. Here are some logs when Running
Running
Thanks! |
btw this is my user and group ID when doing a |
|
@bilogic The bitwarden containers are already configured to run processes as the |
|
@kspearrin I did the following:
I enabled selinux and restarted docker, but the permission denied errors continue to happen |
|
You can tune UID/GID container uses to run its processes thanks to the following conf file : |
|
This is not an issue of lacking permissions for the bitwarden user, the problem is based on wrong selinux fcontexts. I can confirm that adding ":Z" enables the containers to run, I am currently using the following ./bwdata/docker/docker-compose.override.yml as a workarround. version: '3'
services:
mssql:
volumes:
- mssql_data:/var/opt/mssql/data:Z
- ../logs/mssql:/var/opt/mssql/log:Z
- ../mssql/backups:/etc/bitwarden/mssql/backups:Z
web:
volumes:
- ../web:/etc/bitwarden/web:Z
attachments:
volumes:
- ../core/attachments:/etc/bitwarden/core/attachments:Z
api:
volumes:
- ../core:/etc/bitwarden/core:Z
- ../ca-certificates:/etc/bitwarden/ca-certificates:Z
- ../logs/api:/etc/bitwarden/logs:Z
identity:
volumes:
- ../identity:/etc/bitwarden/identity:Z
- ../core:/etc/bitwarden/core:Z
- ../ca-certificates:/etc/bitwarden/ca-certificates:Z
- ../logs/identity:/etc/bitwarden/logs:Z
admin:
volumes:
- ../core:/etc/bitwarden/core:Z
- ../ca-certificates:/etc/bitwarden/ca-certificates:Z
- ../logs/admin:/etc/bitwarden/logs:Z
icons:
volumes:
- ../ca-certificates:/etc/bitwarden/ca-certificates:Z
- ../logs/icons:/etc/bitwarden/logs:Z
notifications:
volumes:
- ../ca-certificates:/etc/bitwarden/ca-certificates:Z
- ../logs/notifications:/etc/bitwarden/logs:Z
events:
volumes:
- ../ca-certificates:/etc/bitwarden/ca-certificates:Z
- ../logs/events:/etc/bitwarden/logs:Z
nginx:
volumes:
- ../nginx:/etc/bitwarden/nginx:Z
- ../letsencrypt:/etc/letsencrypt:Z
- ../ssl:/etc/ssl:Z
- ../logs/nginx:/var/log/nginx:Z
|
@rbicker Do you want to create a pull request for this? |
|
I had to disable selinux again, as we were experiencing some weird issues. Unfortunately I do not have the time to troubleshoot the issue at the moment... |


After running bitwarden.sh with letsencrypt option enabled, I get the following error
Repro steps
bitwarden.shfrom https://go.btwrdn.co/bw-sh./bitwarden.sh installyfor Let's EncryptExpected results
Installation continues
Actual results
Installation fails with permission error
Run trace