docker.recipes

Emby Media Server

intermediate

Media server to organize and stream your media collection.

Overview

Emby Media Server is a powerful personal media server that organizes, manages, and streams your digital media collection across multiple devices and platforms. Originally forked from MediaBrowser in 2013, Emby has evolved into a comprehensive media solution that automatically fetches metadata, artwork, and subtitles for your movies, TV shows, music, and photos while providing transcoding capabilities to ensure content plays smoothly on any device. The server includes advanced features like user management, parental controls, live TV integration, and mobile sync for offline viewing. This Docker deployment leverages the official Emby container with hardware acceleration support through device mapping to /dev/dri, enabling efficient GPU-based transcoding that significantly reduces CPU load during media streaming. The configuration includes proper user ID mapping to maintain file permissions, read-only media mounting to protect your original files, and network isolation for security. The setup exposes both HTTP (8096) and HTTPS (8920) ports, allowing for secure remote access to your media library. This stack is ideal for home media enthusiasts, families wanting centralized entertainment management, and users seeking an alternative to subscription streaming services. Emby excels in mixed-device households where content needs to stream reliably to smart TVs, mobile devices, gaming consoles, and web browsers while maintaining high quality playback and providing detailed viewing analytics and user management features.

Key Features

  • Automatic media library organization with metadata fetching from TheMovieDB, TheTVDB, and MusicBrainz
  • Hardware-accelerated transcoding using Intel Quick Sync, NVIDIA NVENC, or AMD VCE
  • Multi-user support with individual libraries, viewing history, and parental controls
  • Live TV and DVR functionality with HDHomeRun and other tuner integration
  • Mobile device sync for offline viewing and automatic quality optimization
  • Plugin ecosystem for enhanced functionality including trakt.tv integration and advanced notifications
  • Web-based administration interface with detailed server statistics and user analytics
  • DLNA/UPnP media server capabilities for legacy device compatibility

Common Use Cases

  • 1Home media center replacing cable TV with personal movie and TV show collections
  • 2Family entertainment hub with individual user profiles and age-appropriate content filtering
  • 3Remote media streaming for accessing home library while traveling or at work
  • 4Cord-cutting solution combining local media with live TV recording capabilities
  • 5Multi-location media sharing between family members or friends with controlled access
  • 6Backup streaming service during internet outages using locally stored content
  • 7Photo and music streaming server for comprehensive household media management

Prerequisites

  • Minimum 2GB RAM for basic operation, 4GB+ recommended for multiple concurrent streams
  • Fast storage system (SSD preferred) for media metadata and transcoding cache
  • GPU with hardware encoding support (Intel iGPU, NVIDIA, or AMD) for optimal transcoding performance
  • Properly organized media files in standard formats (MP4, MKV, AVI for video; MP3, FLAC for audio)
  • Network bandwidth planning: 10-20 Mbps per 4K stream, 5-10 Mbps per 1080p stream
  • Understanding of user ID mapping and file permissions for media access

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 emby:
3 image: emby/embyserver:latest
4 container_name: emby
5 environment:
6 - UID=1000
7 - GID=1000
8 - GIDLIST=1000
9 volumes:
10 - emby-config:/config
11 - /path/to/media:/media:ro
12 ports:
13 - "8096:8096"
14 - "8920:8920"
15 devices:
16 - /dev/dri:/dev/dri
17 networks:
18 - emby-network
19 restart: unless-stopped
20
21volumes:
22 emby-config:
23
24networks:
25 emby-network:
26 driver: bridge

.env Template

.env
1# Emby
2# Change /path/to/media to your media directory
3# Remove devices section if no hardware transcoding

Usage Notes

  1. 1Web UI at http://localhost:8096
  2. 2Complete setup wizard
  3. 3Premiere for additional features
  4. 4Hardware transcoding support
  5. 5Mobile and TV apps

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 emby:
5 image: emby/embyserver:latest
6 container_name: emby
7 environment:
8 - UID=1000
9 - GID=1000
10 - GIDLIST=1000
11 volumes:
12 - emby-config:/config
13 - /path/to/media:/media:ro
14 ports:
15 - "8096:8096"
16 - "8920:8920"
17 devices:
18 - /dev/dri:/dev/dri
19 networks:
20 - emby-network
21 restart: unless-stopped
22
23volumes:
24 emby-config:
25
26networks:
27 emby-network:
28 driver: bridge
29EOF
30
31# 2. Create the .env file
32cat > .env << 'EOF'
33# Emby
34# Change /path/to/media to your media directory
35# Remove devices section if no hardware transcoding
36EOF
37
38# 3. Start the services
39docker compose up -d
40
41# 4. View logs
42docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/emby-server/run | bash

Troubleshooting

  • Hardware transcoding not working: Verify /dev/dri device mapping and ensure user has render group permissions
  • Media files not detected: Check file permissions, ensure UID/GID 1000 can read media directory structure
  • Slow library scanning: Move Emby config to SSD storage and verify network speed to media locations
  • Remote access issues: Configure port forwarding for 8096/8920 and verify firewall settings
  • High CPU usage during playback: Enable hardware transcoding in server settings and verify GPU driver installation
  • Database corruption after unexpected shutdown: Restore from automatic backup in /config/data/backup directory

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space