mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
Persistent data check does not work with volumes #1326
Reference in New Issue
Block a user
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 @TymanWasTaken on GitHub (Jul 20, 2022).
Subject of the issue
When using a docker volume, vaultwarden incorrectly determines it to not be persistent storage
Deployment environment
Install method: Docker image
Clients used: N/A
Reverse proxy and version: N/A
MySQL/MariaDB or PostgreSQL version: N/A
Other relevant details: Docker version 20.10.17
Steps to reproduce
Attempt to run vaultwarden mounting a docker volume to
/data, no other configuration changesExpected behaviour
Vaultwarden starts fine
Actual behaviour
Vaultwarden refuses to start without the I_REALLY_WANT_VOLATILE_STORAGE env variable set
Troubleshooting data
No troubleshooting data, but I believe this is caused because of a difference in how bind mounts work and how volume works. From what I can tell, vaultwarden detects non-persistent storage by creating a file in the dockerimage, and then checking for it on start. However, this is flawed because docker will automatically populate volumes with any files that images create, making that file visible to vaultwarden regardless of the fact that it is actually persistent storage. I temporarily fixed this by just setting I_REALLY_WANT_VOLATILE_STORAGE=true, but it is still a bug that should probably be fixed.
@BlackDex commented on GitHub (Jul 20, 2022):
Closing as a duplicate of #2622