Storage & Paths
Dubby uses three primary volume mounts. These paths are the same whether you’re running Docker, Docker Compose, Kubernetes, or Unraid.
Volume overview
Section titled “Volume overview”| Container path | Purpose | Persistence |
|---|---|---|
/data | Database, metadata, trickplay | Persistent — back this up |
/cache | Transcode cache | Ephemeral — SSD recommended |
/media | Your media library | Read-only optional |
/data — persistent storage
Section titled “/data — persistent storage”Back this up. It contains everything Dubby needs to remember:
/data├── dubby.db # SQLite database (library, users, watch history)├── .encryption-key # Auto-generated encryption key for sensitive config├── backups/ # Database backups├── images/ # Cached artwork from TMDB (posters, backdrops, logos)└── trickplay/ # Seek preview thumbnail sprites- Database: ~50 MB per 1,000 media items
- Images: 1-5 GB typical, grows with library size (fetched from TMDB on demand)
- Trickplay: ~50 MB per movie/episode with trickplay enabled
/cache — transcode cache
Section titled “/cache — transcode cache”Temporary working space for active playback sessions:
/cache├── {session-id}/ # HLS segments for active sessions│ ├── master.m3u8│ ├── playlist.m3u8│ ├── segment_0.ts│ └── {track-id}.vtt└── ...- Can grow to several GB during active playback
- Cleaned up automatically when sessions end
- SSD strongly recommended for smooth transcoding
- Safe to delete when the server is stopped
/media — your media library
Section titled “/media — your media library”Mount your existing media directories here. Read-only is fine unless you use features that write to the media directory (subtitle downloads, podcasts).
Single mount
Section titled “Single mount”volumes: - /mnt/media:/mediaMultiple mounts
Section titled “Multiple mounts”volumes: - /mnt/movies:/media/movies - /mnt/tv:/media/tv - /mnt/anime:/media/animeDownloaded subtitles are saved alongside your media files:
Movie Name (2024)/├── Movie Name (2024).mkv├── Movie Name (2024).en.srt # Downloaded subtitle└── Movie Name (2024).en.forced.srt # Downloaded forced subtitleCustomizing paths
Section titled “Customizing paths”Storage directories can be customized with environment variables. In Docker, the Dockerfile sets /data and /cache as defaults — you typically don’t need to change these.
| Variable | Docker default | Description |
|---|---|---|
DUBBY_DATA_DIR | /data | Base data directory |
DUBBY_CACHE_DIR | /cache | General cache |
DUBBY_METADATA_CACHE_DIR | DUBBY_DATA_DIR/images | TMDB image cache |
DUBBY_TRICKPLAY_CACHE_DIR | DUBBY_DATA_DIR/trickplay | Trickplay sprites |
The transcode working directory defaults to /tmp/dubby/transcode (symlinked to /cache in Docker) and can be changed via the server.transcodeDir config key or DUBBY_SERVER_TRANSCODE_DIR environment variable.
Backup recommendations
Section titled “Backup recommendations”At minimum, back up the /data volume regularly. This contains:
- Your SQLite database (users, library metadata, watch history, settings)
- Your encryption key (required to decrypt sensitive config values)
- Cached artwork (can be re-fetched, but saves bandwidth)
- Trickplay thumbnails (can be regenerated, but it’s slow)
The /cache volume does not need to be backed up.