this post was submitted on 07 Aug 2023
7 points (100.0% liked)

Selfhosted

38810 readers
169 users here now

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:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. 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.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Hi! I am running a vaultwarden-docker and would like to change the folder where the credentials are stored. This is my current docker-compose-file:

version: '3.4'

services:

vaultwarden:

image: vaultwarden/server:latest

restart: always

ports:

  - '127.0.0.1:8200:80'

volumes:

  - ./vaultwarden:/data/

So my credentials are stored in a folder called vaultwarden in the root of the server.

a) How can i change this folder in the stack-file of portainer without loosing the data?

b) Where would the folder be when i would write "vaultwarden" without the "./"? In the /root-folder?

Sorry for the noob-questions but the docker-tutorials i found are much too high for me. ;)

top 3 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 1 year ago (1 children)

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

[–] [email protected] 1 points 1 year ago

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?

[–] [email protected] 1 points 1 year ago

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.