That's the good thing about containers, that's super easy. Just stop the container, move your folder to your desired location (e.g. /home/user/vaultwarden), change the path in your compose file (stack) (i.e.: /home/user/vaultwarden:/data/), redeploy the stack and that's it :)
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
/thread
Just to correct a mistake: - ./vaultwarden:/data/ means that the folder /data/ of the container is in the subfolder vaultwarden inside the folder that contains the docker-compose.yml. it is not located in /. for that you need to remove the leading "."
If you remove ./ vaultwarden points to a volume named vaultwarden that need to be defined separately:
./vaultwarden = relativ path from the docker-compose folder
/vaultwarden = absolut path /
vaultwarden = a volume called vaultwarden
This is good. there was an OLD vaultwarden-folder in my root-directory and i thought this would be the current, but you are absolutely right: The folder is in the compose-directory!
Do you really think this is a good place?
It's more like quick and dirty. I generally try to create a volume and save the data outside the compose folder. Default is /var/lib/docker/volumes if I remember correctly.
So my credentials are stored in a folder called vaultwarden in the root of the server.
that's not true:
./vaultwarden
with the ./
prefix means that vaultwarden
will be in the same folder as your docker-compose.yml.
It looks as a good position for your setup.