[GH-ISSUE #1405] Why can't I find my database file? #943

Closed
opened 2026-03-03 02:04:54 +03:00 by kerem · 4 comments
Owner

Originally created by @arieslee on GitHub (Feb 19, 2021).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1405

my docker-compose.yml

version: "3"

services:
  bitwarden:
    image: bitwardenrs/server
    container_name: bitwardenrs
    restart: always
    ports:
        - "127.0.0.1:8087:80" 
        - "127.0.0.1:3012:3012"
    volumes:
      - ./data:/home/bw-data
    environment:
      WEBSOCKET_ENABLED: "true"
      SIGNUPS_ALLOWED: "false" 
      WEB_VAULT_ENABLED: "true"

However, the database file cannot be found in the data directory or /home/ bw-data directory

The two directories are empty

Originally created by @arieslee on GitHub (Feb 19, 2021). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1405 my docker-compose.yml ``` version: "3" services: bitwarden: image: bitwardenrs/server container_name: bitwardenrs restart: always ports: - "127.0.0.1:8087:80" - "127.0.0.1:3012:3012" volumes: - ./data:/home/bw-data environment: WEBSOCKET_ENABLED: "true" SIGNUPS_ALLOWED: "false" WEB_VAULT_ENABLED: "true" ``` However, the database file cannot be found in the `data` directory or `/home/ bw-data` directory The two directories are empty
kerem 2026-03-03 02:04:54 +03:00
Author
Owner

@raphaelcoutu commented on GitHub (Feb 19, 2021):

The database file is located into the /data folder in the container

    volumes:
      - ./bw-data:/data
<!-- gh-comment-id:781765664 --> @raphaelcoutu commented on GitHub (Feb 19, 2021): The database file is located into the /data folder in the container ```yaml volumes: - ./bw-data:/data ```
Author
Owner

@arieslee commented on GitHub (Feb 19, 2021):

The database file is located into the /data folder in the container

    volumes:
      - ./bw-data:/data

I need to change this item, don't I

 volumes:
      - /home/bw-data:./data

I've modified it, but I can't start compose

ERROR: for bitwarden  Cannot create container for service bitwarden: invalid volume spec "data": invalid volume specification: 'data': invalid mount config for type "volume": invalid mount path: 'data' mount path must be absolute
<!-- gh-comment-id:781787551 --> @arieslee commented on GitHub (Feb 19, 2021): > The database file is located into the /data folder in the container > > ```yaml > volumes: > - ./bw-data:/data > ``` I need to change this item, don't I ``` volumes: - /home/bw-data:./data ``` I've modified it, but I can't start compose ``` ERROR: for bitwarden Cannot create container for service bitwarden: invalid volume spec "data": invalid volume specification: 'data': invalid mount config for type "volume": invalid mount path: 'data' mount path must be absolute ```
Author
Owner

@raphaelcoutu commented on GitHub (Feb 19, 2021):

The left part is relative to your computer (host) and the right part is the path within the container. You can't change the right part and it has to be absolute ("/data" and not "./data"). The /data folder is at the root of the container.

volumes:
      # Absolute path
      - /home/<user>/bw-data:/data
      # Path relative to docker-compose.yml file
      - ./bw-data:/data

<!-- gh-comment-id:781789981 --> @raphaelcoutu commented on GitHub (Feb 19, 2021): The left part is relative to your computer (host) and the right part is the path within the container. You can't change the right part and it has to be absolute ("/data" and not "./data"). The /data folder is at the root of the container. ```yaml volumes: # Absolute path - /home/<user>/bw-data:/data # Path relative to docker-compose.yml file - ./bw-data:/data ```
Author
Owner

@arieslee commented on GitHub (Feb 19, 2021):

The left part is relative to your computer (host) and the right part is the path within the container. You can't change the right part and it has to be absolute ("/data" and not "./data"). The /data folder is at the root of the container.

volumes:
      # Absolute path
      - /home/<user>/bw-data:/data
      # Path relative to docker-compose.yml file
      - ./bw-data:/data

OK,thank you~

<!-- gh-comment-id:781791772 --> @arieslee commented on GitHub (Feb 19, 2021): > The left part is relative to your computer (host) and the right part is the path within the container. You can't change the right part and it has to be absolute ("/data" and not "./data"). The /data folder is at the root of the container. > > ```yaml > volumes: > # Absolute path > - /home/<user>/bw-data:/data > # Path relative to docker-compose.yml file > - ./bw-data:/data > ``` OK,thank you~
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#943
No description provided.