Media Shelf turns a folder on your computer or NAS into a private photo and video library on your own server. Browse the folders you already have, find files by name, play compatible videos in the browser, and save originals. The application reads the library on demand and runs on a local network after its installation.
Deploy with Docker
-
Unpack the Media Shelf release. Open a terminal in the directory containing the Compose file.
-
Put a few sample photos and videos in the release’s
librarydirectory. Create the directory if it is missing. You can also attach an existing folder using the instructions below. -
Start the container and get the one-time setup code for your browser.
docker compose up -d --build docker compose exec app python manage.py setup-code -
Open Media Shelf on this computer and create your administrator account in the setup wizard. The self-hosting guide covers browser setup, access via the Linux server’s IP, and updates.
Docker binds the host’s ./library directory to /media in the container with read-only access. CIMPLE_MEDIA_DIR=/media selects that mount. The container also has a separate data directory for local accounts and authentication state.
Attach your existing library
-
Set
CIMPLE_LIBRARY_PATHto the path Docker can access. On Linux, start the service as shown below. IncludeCIMPLE_BIND_ADDRESSfor your Linux server’s private IP if you already set it.CIMPLE_LIBRARY_PATH="/srv/family-media" docker compose up -d -
Open Admin → Media Shelf folder if you want to expose a subfolder of that library. Then reload Media Shelf.
-
If the share is on a NAS, mount it on the Docker host first and use the host’s mount path. Give the container user permission to read files and traverse folders.
Run outside Docker
Follow the self-hosting guide to install the Python environment and create your account. Media Shelf uses the media subfolder of your configured cimple data directory by default. Set the environment variable before starting the server to attach a different existing directory.
| Environment | Example |
|---|---|
| POSIX shell | export CIMPLE_MEDIA_DIR=/srv/family-media |
| PowerShell | $env:CIMPLE_MEDIA_DIR = 'D:/Family Photos' |
The standalone release uses port 8723 by default. Set CIMPLE_PORT to override it. Grant the OS account running the server read and traverse permissions on the chosen directory.
Browse, search, and play
- Open a folder tile to see its contents. The path links above the gallery take you back to any parent folder.
- Enter part of a filename or folder name to search the current folder and its descendants. Search is case-insensitive. Start from Library to search the full tree, or open a branch before searching to narrow the scope.
- Use Show to filter photos or videos. Folder tiles stay present so you can keep navigating. Large folders are paginated.
- Select a photo to see its preview. Select a compatible video to use the browser’s player and seek controls. Download original saves a copy in the browser. The original stays in the library.
- Add files with your normal filesystem tools. Reload the relevant folder to see the changes immediately.
File formats
| Behavior | Formats |
|---|---|
| Photo preview | AVIF, BMP, GIF, JPEG, PNG, WebP |
| Video player, subject to browser and codec support | M4V, MOV, MP4, OGV, WebM |
| Browse and download originals | AVI, HEIC, HEIF, M2TS, MKV, MTS, TIFF, WMV |
MP4 with H.264 video and AAC audio is a practical choice for broad browser playback. For a file your browser cannot decode, use Download original and open it in a local player. If you want in-browser playback across a mix of devices, place a separate compatible copy in the folder and retain your original. Animated GIFs use a photo icon in the gallery and load when you open them.
Back up and troubleshoot
- The connection card still appears. Check that the folder exists on the host, that Docker Desktop can share the drive if applicable, and that the server can read the folder. Check
CIMPLE_MEDIA_DIRagainst the path seen by the server. Rundocker compose logs --tail=100 appto inspect server errors. - Some files are missing. The library skips hidden paths, nested symbolic links, Windows junctions and other reparse points, and extensions outside the table. Keep your offline collection as regular local files or mount the actual NAS folder as the library root. Open a smaller branch if a search reports that a browse limit was reached.
- Large collections feel slow. Results are shown 32 at a time, searches inspect at most 12,000 directory entries and show up to 256 matches, and photo previews load as they approach the viewport. Photo previews use the original image bytes, so smaller folders or browser-sized copies can help on slower connections.
- Back up the data and originals separately. The cimple app data backup contains accounts and authentication state. Back up the host media directory with your existing file backup. Restore that directory and reattach the mount when moving to a new host.
- Choose who can sign in. Every enabled account on this Media Shelf instance can browse and download its mounted library. Use a separate instance with its own data and library folders for another group. Follow the private-network or HTTPS setup in the self-hosting guide for remote access.
Research and design choices
- Immich’s external library model showed the value of attaching an existing family archive with a read-only mount. Media Shelf applies that idea directly to on-demand folder browsing. Immich external libraries
- PhotoPrism’s originals view informed the folder drill-down and original-file download. Media Shelf puts those actions on the main screen so they are available as soon as the folder is connected. PhotoPrism file browser
- Jellyfin’s direct-play documentation explains why a file extension alone cannot guarantee browser playback. Media Shelf uses browser-native playback with HTTP byte ranges for seeking and offers the original file when a local player is needed. Jellyfin codec support
Maintainer verification
From the release root with its Python dependencies installed, run python -m unittest apps.media.test_media -v. The test fixture checks authenticated delivery, nested browse and search, filename escaping, standard and partial responses, original downloads, and blocked access through Windows junctions or symbolic links.