# Plex with Tautulli

> Plex Media Server with Tautulli for statistics and monitoring.

- Category: Media & Entertainment
- Difficulty: beginner
- Components: plex, tautulli
- Tags: plex, media-server, streaming, tautulli, monitoring
- Source: https://docker.recipes/media/plex-tautulli-stack

## Overview

Plex Media Server is a comprehensive media management and streaming platform that transforms any computer into a personal Netflix-like service. Originally launched in 2008 as a fork of XBMC, Plex automatically organizes your movies, TV shows, music, and photos with rich metadata, movie posters, and episode descriptions while providing apps for virtually every device imaginable. Unlike basic file sharing, Plex transcodes media on-the-fly to ensure compatibility across different devices and network conditions.

Tautulli serves as the perfect monitoring companion to Plex, acting as a powerful analytics dashboard that tracks every aspect of your media server's usage. This Python-based application connects to Plex's database to provide detailed statistics about what content is being watched, who's watching it, bandwidth usage, and server performance metrics. Together, Plex and Tautulli create a professional-grade media streaming solution with enterprise-level monitoring capabilities.

This combination is ideal for home media enthusiasts who want to monitor their server's performance, families managing multiple user accounts, and anyone running Plex for friends or extended family who needs insights into usage patterns. The pairing enables proactive server management, helping identify bandwidth bottlenecks, popular content, and optimal transcoding settings while maintaining detailed historical records of all media consumption.

## Features

- Automatic metadata matching with movie posters, episode descriptions, and cast information
- Hardware-accelerated transcoding for real-time media conversion across devices
- Comprehensive usage analytics with detailed viewing statistics and user activity tracking
- Real-time monitoring of concurrent streams, bandwidth usage, and transcoding performance
- Historical data retention for long-term usage pattern analysis and server optimization
- Multi-user management with individual viewing histories and personalized recommendations
- Mobile sync capabilities for offline viewing on phones and tablets
- Custom notification system for server events, new content additions, and user activities

## Use cases

- Home media enthusiasts wanting professional-grade streaming with detailed usage insights
- Families sharing large media libraries across multiple devices and user profiles
- Content creators monitoring which shows and movies are most popular among viewers
- System administrators managing Plex servers for small organizations or friend groups
- Home lab enthusiasts seeking comprehensive media server performance analytics
- Users troubleshooting streaming issues by analyzing bandwidth and transcoding data
- Media collectors tracking viewing habits to optimize storage and content acquisition

## Prerequisites

- Minimum 2GB RAM recommended for smooth Plex transcoding operations
- Valid Plex account and claim token from plex.tv/claim for server registration
- Organized media library with movies and TV shows in separate folder structures
- Available ports 32400 (Plex web interface) and 8181 (Tautulli dashboard)
- Basic understanding of media formats and transcoding concepts
- Sufficient storage space for Plex metadata cache and transcode temporary files

## docker-compose.yml

```yaml
services:
  plex:
    image: plexinc/pms-docker:latest
    container_name: plex
    restart: unless-stopped
    ports:
      - "${PLEX_PORT:-32400}:32400/tcp"
      - "3005:3005/tcp"
      - "8324:8324/tcp"
      - "32469:32469/tcp"
    environment:
      - TZ=${TZ:-UTC}
      - PLEX_CLAIM=${PLEX_CLAIM}
      - PLEX_UID=${PUID:-1000}
      - PLEX_GID=${PGID:-1000}
    volumes:
      - plex_config:/config
      - plex_transcode:/transcode
      - ${MEDIA_PATH:-./media}:/data:ro
    networks:
      - media-network

  tautulli:
    image: ghcr.io/tautulli/tautulli:latest
    container_name: tautulli
    restart: unless-stopped
    ports:
      - "${TAUTULLI_PORT:-8181}:8181"
    environment:
      - TZ=${TZ:-UTC}
      - PUID=${PUID:-1000}
      - PGID=${PGID:-1000}
    volumes:
      - tautulli_config:/config
    depends_on:
      - plex
    networks:
      - media-network

volumes:
  plex_config:
  plex_transcode:
  tautulli_config:

networks:
  media-network:
    driver: bridge
```

## .env

```bash
# Plex Media Stack
PLEX_PORT=32400
PLEX_CLAIM=claim-xxxxxxxxxxxx
TAUTULLI_PORT=8181
TZ=UTC
PUID=1000
PGID=1000
MEDIA_PATH=./media
```

## Usage notes

- Plex at http://localhost:32400/web
- Get claim token from plex.tv/claim
- Tautulli at http://localhost:8181
- Connect Tautulli to Plex in settings

## Troubleshooting

- Plex server not accessible remotely: Check port forwarding for 32400 and ensure Plex account is properly claimed
- Tautulli showing 'Unable to connect to Plex': Verify Plex server URL is set to http://plex:32400 in Tautulli settings
- High CPU usage during streaming: Enable hardware transcoding in Plex settings or adjust quality settings to reduce load
- Missing movie metadata and posters: Ensure media files follow Plex naming conventions and check agent settings
- Tautulli statistics not updating: Restart both containers and verify Plex database permissions are correctly set
- Transcoding fails with permission errors: Check that PUID/PGID environment variables match your system user permissions

