Trilium fails to access existing volume path in WSL2 Docker (ENOENT: no such file or directory) #6136
Replies: 2 comments 2 replies
-
Yes, but the path When you added:
You modified the container's environment to have This line:
Is reading from the process that starts the Docker Compose stack, so you'd need to have The above image, and me setting the environment variable and having it work as I assume you expect, is with this services:
trilium:
image: triliumnext/notes:latest
restart: unless-stopped
ports:
- '8001:8080'
volumes:
# Unless TRILIUM_DATA_DIR is set, the data will be stored in the "trilium-data" directory in the home directory.
- ${TRILIUM_DATA_DIR:-~/trilium-data}:/home/node/trilium-data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro |
Beta Was this translation helpful? Give feedback.
-
Or instead of relying on environment variables (which is where I believe you're confused), swap out: volumes:
# Unless TRILIUM_DATA_DIR is set, the data will be stored in the "trilium-data" directory in the home directory.
- ${TRILIUM_DATA_DIR:-~/trilium-data}:/home/node/trilium-data for volumes:
# Unless TRILIUM_DATA_DIR is set, the data will be stored in the "trilium-data" directory in the home directory.
- /home/dms24/trilium-data:/home/node/trilium-data For a total docker compose file of: services:
trilium:
image: triliumnext/notes:latest
restart: unless-stopped
ports:
- '8001:8080'
volumes:
# Unless TRILIUM_DATA_DIR is set, the data will be stored in the "trilium-data" directory in the home directory.
- /home/dms24/trilium-data:/home/node/trilium-data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hello Trilium Team,
I'm facing a directory access issue when trying to run Trilium via Docker in a WSL2 environment on Windows using Docker Desktop.
Issue:


Trilium throws the following error during startup:
Error: ENOENT: no such file or directory, mkdir '/home/dms24/trilium-data'
NOTE:
TRILIUM_DATA_DIR
path does exist in WSL (/home/dms24/trilium-data
).Environment:
triliumnext/notes:latest
docker-compose.yml
file:Beta Was this translation helpful? Give feedback.
All reactions