Retreivr resolves filesystem paths at runtime from engine/paths.py.
For each core path:
- Environment variable override (
RETREIVR_*_DIR) - Runtime defaults from
engine/paths.py - Container or local filesystem behavior based on runtime detection
When /.dockerenv exists or /data exists, defaults are:
DATA_DIR=/dataDOWNLOADS_DIR=/downloadsCONFIG_DIR=/configLOG_DIR=/logsTOKENS_DIR=/tokens
No RETREIVR_*_DIR overrides are required when mounts match this layout.
Defaults remain developer-friendly and project-relative:
DATA_DIR=<project>/dataDOWNLOADS_DIR=<project>/data/downloadsCONFIG_DIR=<project>/data/configLOG_DIR=<project>/data/logsTOKENS_DIR=<project>/data/tokens
| Variable | Purpose | Typical container path |
|---|---|---|
RETREIVR_CONFIG_DIR |
config.json location | /config |
RETREIVR_DATA_DIR |
temp files, runtime data | /data |
RETREIVR_DOWNLOADS_DIR |
final downloads | /downloads |
RETREIVR_LOG_DIR |
logs | /logs |
RETREIVR_TOKENS_DIR |
cookies/auth tokens | /tokens |
services:
retreivr:
volumes:
- /host/media:/downloads
- /host/data:/data
- /host/config:/config
- /host/logs:/logs
- /host/tokens:/tokensOlder deployments often used /app/data for everything. Migrate by remapping volumes to the canonical split layout.
If your DB stores absolute old download paths, rewrite them after backup:
UPDATE downloads
SET filepath = REPLACE(filepath, '/app/data/downloads', '/downloads')
WHERE filepath LIKE '/app/data/downloads%';
UPDATE download_history
SET destination = REPLACE(destination, '/app/data/downloads', '/downloads')
WHERE destination LIKE '/app/data/downloads%';
UPDATE download_jobs
SET file_path = REPLACE(file_path, '/app/data/downloads', '/downloads')
WHERE file_path LIKE '/app/data/downloads%';
UPDATE download_jobs
SET resolved_destination = REPLACE(resolved_destination, '/app/data/downloads', '/downloads')
WHERE resolved_destination LIKE '/app/data/downloads%';
UPDATE downloaded_music_tracks
SET file_path = REPLACE(file_path, '/app/data/downloads', '/downloads')
WHERE file_path LIKE '/app/data/downloads%';- If a volume is not mounted, files may be written into the container layer and appear missing from host storage.
- UI browse roots (
/downloads,/config,/tokens) map directly to backend browse roots.