mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 09:46:00 +03:00
[GH-ISSUE #5945] Unable to run server in container with a non root user #2292
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#2292
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MartinK07 on GitHub (Jun 10, 2025).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/5945
Vaultwarden Support String
Your environment (Generated via diagnostics page)
Config & Details (Generated via diagnostics page)
Show Config & Details
Config:
Vaultwarden Build Version
vaultwarden/server:1.34.1
Deployment method
Official Container Image
Custom deployment method
No response
Reverse Proxy
None
Host/Server Operating System
Linux
Operating System Version
Fedora 42
Clients
Web Vault
Client Version
No response
Steps To Reproduce
runAsNonRoot: truesetting in Kubernetes):Expected Result
Process starts and is able to write into the
/datadirectory.Actual Result
Container fails to write into
/data, because the permissions are readonly for the user that the vaultwarden process starts under (UID 1000 | GID 0)Logs
Screenshots or Videos
No response
Additional Context
Even if the default user for the container user is overwritten e.g.
--user 1000orrunAsNonRoot: true+runAsUser: 1000in Kubernetes, the groupid usually stays GID 0 (root):With this in mind, a simple fix for this would be setting the permissions for the
/datadirectory during the dockerbuild process to 775 instead of 755.