# Stash Media Organizer

> Stash organizer and player for adult media collections.

- Category: Media & Entertainment
- Difficulty: beginner
- Components: stash
- Tags: stash, media-organizer, video, tagging, metadata
- Source: https://docker.recipes/media/stash-adult-media

## Overview

Stash is an open-source media organizer and player specifically designed for adult content collections, developed to address the unique challenges of organizing, cataloging, and managing large video libraries with comprehensive metadata support. The application provides automatic scene detection, performer identification, studio tagging, and sophisticated search capabilities that go far beyond basic file management systems. Stash uses advanced fingerprinting technology to identify duplicate content, scrapes metadata from multiple sources, and offers detailed tagging systems that allow users to organize content by performers, studios, tags, and custom categories. This Docker deployment creates a self-contained media management server that processes your existing video collection, generates thumbnails and previews, extracts metadata, and provides a responsive web interface for browsing and playback. The containerized approach ensures consistent performance across different host systems while maintaining data persistence through dedicated volumes for configuration, generated content, metadata, and cache storage. Organizations and individuals managing large media collections will find this solution particularly valuable for its ability to automatically organize thousands of files, eliminate duplicates, and provide sophisticated search and filtering capabilities that would be impossible to achieve manually.

## Features

- Automatic scene fingerprinting and duplicate detection using StashDB integration
- Multi-source metadata scraping from various adult industry databases and APIs
- Advanced performer and studio identification with facial recognition capabilities
- Comprehensive tagging system with hierarchical tag organization and bulk operations
- Built-in video player with chapter support, bookmark functionality, and playback statistics
- Plugin ecosystem supporting custom scrapers, automation scripts, and third-party integrations
- Intelligent thumbnail and sprite generation for quick visual browsing and seeking
- Advanced search engine supporting complex queries across all metadata fields and custom filters

## Use cases

- Personal media server for organizing and streaming large video collections with privacy
- Content verification and duplicate elimination for media archival projects
- Research and academic environments requiring detailed media categorization and analysis
- Digital asset management for content creators tracking source material and references
- Home media center integration for users seeking advanced organization beyond Plex or Jellyfin
- Collection management for media enthusiasts requiring detailed performer and studio tracking
- Automated content processing workflows for organizations managing large video archives

## Prerequisites

- Docker and Docker Compose installed with at least 4GB RAM allocated to containers
- Sufficient disk space for generated thumbnails and metadata (approximately 10-20% of media size)
- Port 9999 available on the host system for web interface access
- Read access to media directories that will be mounted into the container
- Basic understanding of Docker volume management for backup and data migration
- Network connectivity for metadata scraping and StashDB integration during setup

## docker-compose.yml

```yaml
services:
  stash:
    image: stashapp/stash:latest
    container_name: stash
    environment:
      - STASH_STASH=/data/
      - STASH_GENERATED=/generated/
      - STASH_METADATA=/metadata/
      - STASH_CACHE=/cache/
    volumes:
      - stash_config:/root/.stash
      - /path/to/media:/data
      - stash_generated:/generated
      - stash_metadata:/metadata
      - stash_cache:/cache
    ports:
      - "9999:9999"
    restart: unless-stopped
    networks:
      - stash-network

volumes:
  stash_config:
  stash_generated:
  stash_metadata:
  stash_cache:

networks:
  stash-network:
    driver: bridge
```

## .env

```bash
# Stash
# Configuration via web interface
```

## Usage notes

- Web UI at http://localhost:9999
- Initial setup wizard
- Automatic metadata scraping
- Scene fingerprinting
- Plugin support

## Troubleshooting

- Stash fails to start with permission errors: Ensure media directories have proper read permissions and Docker daemon has access to mounted paths
- Web interface shows 'Database locked' error: Stop the container cleanly, check for corrupted database files in the config volume, and restart with proper shutdown procedures
- Scanning stops or freezes during large imports: Increase Docker container memory allocation and ensure sufficient disk space for temporary processing files
- Thumbnails not generating for certain video formats: Install additional video processing libraries in the container or convert media to supported formats like MP4 or MKV
- Plugin installation fails with permission errors: Verify the plugins directory has write permissions and restart Stash after plugin installation
- StashDB scraping returns no results: Check internet connectivity from container and verify StashDB API endpoints are accessible through firewall

