Skip to content
Author Nejat Hakan
eMail nejat.hakan@outlook.de
PayPal Me https://paypal.me/nejathakan


Media Server Emby

Introduction

Welcome to the comprehensive guide on self-hosting Emby, a powerful and versatile media server solution. This section introduces Emby, discusses the rationale behind self-hosting it, compares it with popular alternatives, and outlines the basic system requirements. We aim to provide you with a foundational understanding before diving into the practical aspects of setting up and managing your own Emby instance.

What is Emby?

Emby is a personal media server software designed to organize, play, and stream your digital media collections—movies, TV shows, music, photos, and even live TV—to a wide variety of client devices. Think of it as your personal, self-hosted alternative to services like Netflix, Spotify, or Google Photos, but using your own media files stored on your own hardware. It consists of two main components:

  1. Emby Server: This is the core software that runs on a computer (Windows, macOS, Linux) or a Network Attached Storage (NAS) device within your home network. It scans your media folders, fetches metadata (like cover art, descriptions, cast information), transcodes media files when necessary for compatibility with client devices, and manages user access.
  2. Emby Clients: These are applications that run on various devices (Smart TVs, streaming boxes like Apple TV or Nvidia Shield, smartphones, tablets, web browsers, game consoles) and connect to your Emby Server to browse and play your media.

Emby offers a centralized hub for all your media, presenting it in a rich, user-friendly interface accessible from virtually anywhere, provided you configure remote access.

Why Self-Host Emby?

In an era dominated by cloud streaming services, choosing to self-host your media server might seem counter-intuitive. However, self-hosting Emby offers significant advantages, particularly appealing to enthusiasts, privacy-conscious users, and those with large, curated media collections:

  1. Complete Control: You own the hardware, the software configuration, and most importantly, the data. You decide how your media is organized, who has access, and how the server behaves. There are no external dependencies on third-party services dictating terms or potentially discontinuing support.
  2. Privacy: Your media collection details, watch history, and user data remain entirely within your control on your own server. Unlike commercial streaming services, your viewing habits aren't tracked or monetized by external companies.
  3. Customization: Emby offers extensive customization options, from interface themes and home screen layouts to fine-grained control over transcoding, metadata sources, and user permissions. You can tailor the experience precisely to your needs.
  4. No Subscription Fees (Mostly): The core Emby server software is free to use for organizing and streaming media within your local network. While some advanced features (like hardware transcoding on certain platforms, offline media sync, live TV DVR, and certain client apps) require an optional Emby Premiere subscription, the fundamental functionality is free. Self-hosting avoids recurring monthly fees associated with commercial streaming platforms.
  5. Consolidation: Bring all your disparate media files—movies ripped from DVDs/Blu-rays, home videos, downloaded TV shows, music library, family photos—into one beautifully organized interface.
  6. Offline Access: Your media is always available on your local network, regardless of internet connectivity to the outside world. With Emby Premiere, you can also sync media to devices for offline viewing on the go.
  7. Learning Opportunity: Setting up and managing a media server is an excellent way to learn about networking, server administration, operating systems (especially Linux if you choose that route), storage management, and media encoding.

Emby vs. Plex vs. Jellyfin

Emby exists in a competitive space alongside Plex and Jellyfin, two other popular media server solutions. Understanding their key differences helps in choosing the right one for your needs:

  • Emby:
    • Pros: Highly customizable, robust feature set, strong metadata management, active development, optional Premiere subscription for advanced features. Supports Live TV/DVR. Good balance between ease of use and advanced configuration.
    • Cons: Some core features (like hardware transcoding on certain platforms and easier mobile sync) require the paid Emby Premiere subscription. The source code was originally open but became proprietary (closed-source) around version 3.6, which led to the Jellyfin fork.
  • Plex:
    • Pros: Very polished user interface, wide client device compatibility, generally considered the easiest to set up and use, free tier is quite functional, optional Plex Pass subscription for advanced features (similar to Emby Premiere). Strong remote access capabilities out-of-the-box.
    • Cons: Closed-source, relies more heavily on Plex's cloud services for authentication and discovery (can be a privacy concern for some), customization options are less extensive than Emby or Jellyfin. Requires a Plex account even for local access by default (can be configured otherwise, but less straightforward).
  • Jellyfin:
    • Pros: Completely free and open-source (FOSS), forked from Emby before it went closed-source, no paid subscriptions or premium features locked behind paywalls, all features (including hardware transcoding, sync) are available for free. Strong community support. Privacy-focused.
    • Cons: Can be slightly less polished than Emby or Plex in terms of UI and client app availability/maturity (though rapidly improving), development can sometimes lag behind commercial counterparts in certain areas, setup might require slightly more technical know-how compared to Plex.

Choosing Between Them:

  • Choose Plex if you prioritize ease of use, the widest device compatibility, and a very polished interface, and don't mind closed-source software or reliance on cloud services.
  • Choose Emby if you want a balance of features, customization, and polish, are willing to potentially pay for Emby Premiere for advanced features, and prefer more control than Plex offers.
  • Choose Jellyfin if you strongly prefer free and open-source software, want all features without payment, value maximum privacy and control, and are comfortable with a slightly steeper learning curve or occasional rough edges.

This guide focuses on Emby, offering a powerful and configurable self-hosted media experience.

System Requirements

The hardware required to run Emby Server depends heavily on your usage patterns, specifically:

  1. Number of Concurrent Streams: How many users will be watching simultaneously?
  2. Transcoding Needs: Will your client devices be able to "Direct Play" most of your media, or will the server need to transcode files frequently? Transcoding (converting media on-the-fly to a compatible format/bitrate) is the most CPU-intensive task.
  3. Media Resolution: Streaming and especially transcoding 4K HDR content requires significantly more processing power than 1080p or 720p content.
  4. Library Size: While less critical for performance, very large libraries might require more RAM for caching metadata and faster browsing.

General Guidelines:

  • CPU:
    • Basic Use (1-2 streams, mostly Direct Play, 1080p): A modern dual-core processor (e.g., Intel Core i3, AMD Ryzen 3, or even a powerful ARM CPU like on a Raspberry Pi 4 for very light use) might suffice.
    • Moderate Use (Multiple streams, some 1080p transcoding): A quad-core processor (e.g., Intel Core i5/i7, AMD Ryzen 5/7) is recommended. Aim for a CPU with a PassMark score of at least 4000 for one 1080p transcode, 6000+ for multiple or higher quality transcodes.
    • Heavy Use (Multiple 4K streams, frequent 4K transcoding): A powerful quad-core or hex-core+ processor (e.g., modern Intel Core i7/i9, AMD Ryzen 7/9) is necessary. For 4K HDR transcoding, a PassMark score of 12000+ is often suggested per stream, although Hardware Acceleration is highly recommended here.
    • Hardware Acceleration: If you plan on transcoding frequently, especially 4K content, using a CPU with integrated graphics that supports hardware acceleration (Intel Quick Sync Video - QSV) or a dedicated NVIDIA GPU (NVENC support) is highly recommended. This offloads the transcoding workload from the main CPU cores, drastically reducing CPU usage and allowing less powerful CPUs to handle multiple transcodes efficiently. Emby Premiere is often required to unlock hardware transcoding features fully.
  • RAM:
    • Minimum: 2GB RAM is the absolute minimum, suitable only for small libraries and very light use.
    • Recommended: 4GB - 8GB RAM is generally recommended for a smooth experience with moderate libraries and several simultaneous streams.
    • Large Libraries/Heavy Use: 8GB+ RAM can be beneficial, especially if running other services alongside Emby or using containerization like Docker.
  • Storage:
    • Operating System/Emby Installation: A small SSD (Solid State Drive) of 64GB or larger is recommended for the OS and Emby server application/metadata for responsiveness. Emby's metadata (images, database files) can grow significantly depending on library size (expect several GBs, potentially tens or hundreds for massive libraries).
    • Media Storage: This depends entirely on the size of your media collection. You'll need sufficient hard drive space (HDDs are usually fine for media storage) to hold all your movies, TV shows, music, etc. Consider redundancy (RAID, backups) to protect your valuable media data.
  • Network:

    • Local Network: A wired Gigabit Ethernet connection (1000 Mbps) for the Emby server is highly recommended for reliable streaming, especially for high-bitrate content. Fast Wi-Fi (AC or AX) might work but wired is generally preferred for servers.
    • Internet Connection (for Remote Access): Your upload speed is critical for remote streaming quality. A minimum of 5-10 Mbps upload per remote stream is advisable for 1080p content. 4K streaming requires significantly more (25+ Mbps upload per stream).
  • Operating System: Emby Server runs on:

    • Windows (Windows 7 SP1 and later, Windows Server 2008 R2 SP1 and later)
    • macOS (macOS 10.13 High Sierra and later)
    • Linux (Various distributions like Ubuntu, Debian, Fedora, CentOS)
    • FreeBSD
    • Docker (Platform-agnostic containerization)
    • NAS Devices (Synology, QNAP, Asustor, etc., via package centers)

This guide will primarily focus on Linux and Docker installations due to their prevalence in the self-hosting community, but the core concepts apply across platforms.

Basic Level

This section covers the fundamental steps to get your Emby server up and running, including installation, adding your media, and setting up basic user access. By the end of this section, you will have a functional Emby server capable of streaming media within your local network.

1. Installation and Initial Setup

Getting Emby Server installed is the first practical step. We'll explore the different ways to install it, focusing on Docker as a popular and flexible method, and then walk through the initial configuration wizard.

Choosing an Installation Method (Docker, Native, NAS)

Emby offers flexibility in how you install the server software. The best method depends on your operating system, technical comfort level, and existing infrastructure.

Docker Installation Explained

Docker is a containerization platform that packages applications and their dependencies into isolated environments called containers. Running Emby in Docker offers several advantages:

  • Isolation: Emby runs in its own container, separate from your host operating system. This prevents potential conflicts with other software and keeps your host system cleaner.
  • Consistency: Docker containers run the same way regardless of the underlying host OS (Linux, Windows, macOS supporting Docker), simplifying setup across different environments.
  • Easy Updates: Updating Emby is often as simple as pulling the latest Docker image and recreating the container while preserving your configuration and data volumes.
  • Dependency Management: Docker handles all of Emby's dependencies within the container, eliminating the need to install them manually on your host system.
  • Resource Management: Docker allows you to control resource limits (CPU, RAM) for the container if needed.

How it Works: You use a pre-built Emby Server "image" provided by the Emby team or the LinuxServer.io community (popular for its well-maintained images). You then "run" this image to create a container. During setup, you map persistent storage locations (volumes) on your host system into the container for Emby's configuration (/config) and your media files (/data, /movies, /tv, etc.). You also map network ports (e.g., port 8096) from the host to the container so you can access the Emby web interface.

Considerations: Requires Docker to be installed and a basic understanding of Docker concepts (images, containers, volumes, ports). Hardware acceleration setup might require extra Docker arguments to pass through the GPU device.

Native Installation Explained (Linux, Windows, macOS)

Native installation involves downloading an installer package specific to your operating system and running it directly on the host machine.

  • Linux: Emby provides .deb packages for Debian/Ubuntu-based distributions and .rpm packages for Fedora/CentOS-based distributions. Installation typically involves downloading the package and using the system's package manager (like apt or dnf) to install it along with its dependencies. Emby usually runs as a system service managed by systemd.
    • Pros: Potentially simpler initial setup for users unfamiliar with Docker, direct access to system hardware (can simplify hardware acceleration setup in some cases).
    • Cons: Emby is installed directly onto the host OS, potentially leading to conflicts or clutter. Updates might require manual download and installation or repository configuration. Managing dependencies falls on the host system.
  • Windows: Emby provides a standard .exe installer. You download it, run the installer wizard, and Emby typically installs as a system service or a user application.
    • Pros: Very straightforward installation for Windows users.
    • Cons: Same as Linux native installs regarding host system integration and potential conflicts.
  • macOS: Emby provides a .dmg disk image. You open the image and drag the Emby Server application to your Applications folder.
    • Pros: Standard macOS installation process.
    • Cons: Similar to other native installs. May not automatically run as a service without additional configuration (e.g., using launchd).

Considerations: Choose native if you prefer not to use Docker or if you have specific hardware integration needs that are easier without containerization. Ensure you download the correct package for your OS version and architecture.

NAS Package Installation Explained

Many popular Network Attached Storage (NAS) device manufacturers (like Synology, QNAP, Asustor) offer Emby Server as an installable package through their respective package centers or app stores.

  • Pros: Often the simplest installation method for NAS users. Usually integrates well with the NAS operating system and storage volumes. Updates are typically handled through the NAS package center.
  • Cons: The version available in the package center might lag behind the latest official Emby release. Customization options might be limited compared to Docker or native installs. Performance depends heavily on the NAS hardware (many consumer NAS devices have low-power CPUs unsuitable for heavy transcoding). Hardware acceleration support can vary and may require specific NAS models and configuration.

Considerations: Ideal if you already own a compatible NAS and prefer a simple, integrated solution. Check your NAS model's compatibility and performance capabilities before relying on it for demanding Emby tasks.

Recommendation: For flexibility, scalability, and ease of management, Docker is generally the recommended method for self-hosting Emby, especially in a Linux environment or for users comfortable with containerization concepts. This guide's workshops will primarily focus on the Docker method.

Performing the Installation (Focus on Docker)

We will detail the Docker installation process in the workshop below. The general steps involve:

  1. Install Docker and Docker Compose: Ensure Docker Engine and optionally Docker Compose (for easier container management via docker-compose.yml files) are installed on your host system. Follow the official Docker documentation for your specific OS.
  2. Choose an Emby Docker Image: You can use the official emby/embyserver image or the popular linuxserver/emby image. The linuxserver image is often preferred for its standardization, user/group ID mapping, and community support.
  3. Prepare Host Directories: Create directories on your host system to store Emby's configuration data and your media files. Ensure appropriate permissions are set.
  4. Run the Docker Container: Use the docker run command or a docker-compose.yml file to start the Emby container. This involves:
    • Specifying the image to use.
    • Giving the container a name.
    • Mapping the necessary ports (e.g., -p 8096:8096 for the web UI).
    • Mapping the configuration volume (e.g., -v /path/to/your/emby/config:/config).
    • Mapping your media volumes (e.g., -v /path/to/your/movies:/data/movies).
    • Setting user and group IDs (PUID, PGID) – especially important for the linuxserver image to avoid permission issues with your media files.
    • Optionally passing through hardware devices for transcoding (e.g., --device=/dev/dri:/dev/dri for Intel QSV on Linux).
    • Setting the timezone (TZ).
    • Configuring restart policy (e.g., unless-stopped).

Initial Server Configuration Wizard

Once the Emby Server container is running (or the native service is started), you can access the web-based setup wizard.

  1. Access the Web UI: Open a web browser on a computer connected to the same local network as your Emby server. Navigate to http://<YourServerIP>:8096 (replace <YourServerIP> with the actual local IP address of the machine running Emby).
  2. Welcome Screen: You'll be greeted by the Emby setup wizard. Select your preferred language.
  3. Create Administrator User: Set up your primary administrator account. Choose a username and a strong password. This account will have full control over the server.
  4. Media Libraries: The wizard will prompt you to add your media libraries. You can do this now or skip it and add them later from the server dashboard. We will cover adding libraries in detail in the next section. If you choose to add them now, you'll select the content type (Movies, TV Shows, etc.), give the library a name, and specify the folder path as seen by the Emby server (e.g., /data/movies if you mapped your host movie directory to that path inside the Docker container).
  5. Metadata Language: Select your preferred language for fetching metadata (movie descriptions, titles, etc.) and the country for retrieving content ratings.
  6. Remote Access: Configure basic remote access settings. You can enable or disable automatic port mapping (UPnP/NAT-PMP, often unreliable or insecure, manual port forwarding is preferred) and link your server to Emby Connect (optional, cloud-assisted remote access). We will cover remote access in more detail later. For now, you can usually accept the defaults or disable automatic mapping.
  7. Terms of Service: Accept the Emby Terms of Service.
  8. Finish: Complete the wizard. You will be taken to the Emby Server dashboard.

Your Emby server is now installed and has its basic configuration in place. The next step is to populate it with your media.

Workshop Installing Emby Server using Docker

This workshop guides you through installing Emby Server on a Linux system using Docker and the popular linuxserver/emby image.

Prerequisites

  • A Linux machine (like Ubuntu, Debian, Fedora) with Docker and Docker Compose installed. Refer to the official Docker documentation for installation instructions specific to your distribution.
  • Basic familiarity with the Linux command line.
  • Root or sudo privileges.
  • Knowing the local IP address of your Linux machine (use ip a or hostname -I).

Step 1 Find User and Group IDs

To avoid permission issues between the Docker container and your media files on the host, it's crucial to run the container with the same user ID (UID) and group ID (GID) as the user who owns the media files.

Open a terminal and run the id command:

id ${USER}

(Replace ${USER} with the username that owns your media files, or just id if you are logged in as that user). Note down the uid and gid values. For example, you might see uid=1000(myuser) gid=1000(myuser).

Step 2 Create Host Directories for Configuration and Media

Create directories on your host system where Emby's configuration will be stored persistently, and where your media resides (or will reside).

# Create a directory for Emby configuration
sudo mkdir -p /opt/emby/config

# Create example directories for media (adjust paths as needed)
sudo mkdir -p /srv/data/movies
sudo mkdir -p /srv/data/tvshows

# IMPORTANT: Set ownership of media directories to the user found in Step 1
# Replace '1000:1000' with your actual UID:GID
sudo chown -R 1000:1000 /srv/data
# Optionally set permissions (example: read/write for owner, read for group/others)
sudo chmod -R 755 /srv/data

Explanation:

  • /opt/emby/config: This will store the Emby database, settings, metadata cache, etc. Keeping this outside the container ensures your data persists even if the container is removed and recreated. /opt is a common location for optional software packages.
  • /srv/data/...: These are example locations for your media files. /srv is often used for data served by the system. You can use any path you prefer, like /media/storage/... or /home/user/Media/.... Ensure the user Emby will run as (defined by PUID/PGID) has read access (and ideally write access if you want Emby to manage metadata files like NFOs alongside your media).

Step 3 Create the Docker Compose File

Using Docker Compose makes managing the container configuration much easier than long docker run commands. Create a file named docker-compose.yml in a convenient location (e.g., /opt/emby/ or /home/user/docker/emby/).

# Navigate to your chosen directory
cd /opt/emby/

# Create and edit the docker-compose.yml file
sudo nano docker-compose.yml

Paste the following content into the file, carefully adjusting the PUID, PGID, TZ, volumes paths, and potentially devices for hardware acceleration:

version: "3.8"
services:
  emby:
    image: linuxserver/emby:latest
    container_name: emby
    environment:
      - PUID=1000 # Replace with your UID from Step 1
      - PGID=1000 # Replace with your GID from Step 1
      - TZ=Etc/UTC # Replace with your Timezone, e.g., America/New_York
      - UMASK_SET=022 # Optional: Sets file creation mask (022 is common)
    volumes:
      - /opt/emby/config:/config # Map host config dir to container /config
      - /srv/data/movies:/data/movies # Map host movies dir to container /data/movies
      - /srv/data/tvshows:/data/tvshows # Map host TV shows dir to container /data/tvshows
      # Add more volume mappings for other media types (music, photos) as needed
      # - /srv/data/music:/data/music
    ports:
      - "8096:8096" # Web UI (HTTP)
      - "8920:8920" # Web UI (HTTPS, if enabled in Emby)
      # Add other ports if needed (e.g., for DLNA, Live TV)
      # - "1900:1900/udp" # DLNA discovery
      # - "7359:7359/udp" # Emby device discovery
    # Uncomment below for Intel Quick Sync Video (QSV) hardware acceleration on Linux
    # devices:
    #   - /dev/dri:/dev/dri
    # Uncomment below for NVIDIA hardware acceleration (requires nvidia-docker runtime)
    # deploy:
    #   resources:
    #     reservations:
    #       devices:
    #         - driver: nvidia
    #           count: 1
    #           capabilities: [gpu]
    restart: unless-stopped

Explanation:

  • version: "3.8": Specifies the Docker Compose file format version.
  • services:: Defines the different application services (we only have one: emby).
  • emby:: The name of our service.
  • image: linuxserver/emby:latest: Specifies the Docker image to use. latest pulls the most recent stable version.
  • container_name: emby: Sets a specific name for the container for easier identification.
  • environment:: Sets environment variables inside the container.
    • PUID, PGID: Crucial for linuxserver images to set the internal user/group ID, ensuring proper file permissions for the mapped volumes. Replace 1000:1000 with your values.
    • TZ: Sets the timezone. Find your timezone from timedatectl list-timezones.
    • UMASK_SET: Controls default file permissions for files created by Emby (e.g., NFO files). 022 allows owner write access, group/others read access.
  • volumes:: Maps directories from your host machine to directories inside the container.
    • /opt/emby/config:/config: Links the host configuration directory to the expected /config path inside the container. Crucial for data persistence.
    • /srv/data/movies:/data/movies: Links your host movies directory to /data/movies inside the container. When adding libraries in Emby, you will use the container path (/data/movies). Adjust host paths to match your setup.
  • ports:: Maps network ports from the host to the container.
    • "8096:8096": Maps host port 8096 to container port 8096 (Emby's default HTTP web UI port). You access Emby via http://<YourServerIP>:8096.
    • "8920:8920": Maps the default HTTPS port. You only need this if you plan to enable HTTPS directly within Emby (often handled by a reverse proxy instead).
  • devices: (Optional, for Intel QSV): Passes the host's graphics rendering device (/dev/dri) into the container, allowing Emby to use Intel Quick Sync for hardware acceleration.
  • deploy: (Optional, for NVIDIA): Configures access to NVIDIA GPUs using the NVIDIA container toolkit. Requires nvidia-docker2 to be installed and configured on the host.
  • restart: unless-stopped: Ensures the container automatically restarts if it crashes or if the Docker daemon restarts, unless you manually stop it.

Save the file (Ctrl+X, then Y, then Enter in nano).

Step 4 Running the Emby Container

Now, use Docker Compose to pull the image and start the container in the background.

# Make sure you are in the directory containing docker-compose.yml
cd /opt/emby/

# Pull the image and start the container in detached mode (-d)
sudo docker-compose up -d

Docker will download the linuxserver/emby image (if not already present) and create/start the container according to your docker-compose.yml configuration.

Step 5 Accessing the Emby Web UI and Initial Setup

Wait a minute or two for the container to initialize. Then, open your web browser and navigate to:

http://<YourServerIP>:8096

(Replace <YourServerIP> with the actual local IP address of your Linux machine).

You should see the Emby setup wizard. Follow the on-screen instructions as described in the "Initial Server Configuration Wizard" section above:

  • Select language.
  • Create your administrator user and password.
  • Skip adding media libraries for now (we'll do that in the next section's workshop).
  • Configure metadata language and country.
  • Review remote access settings (can leave defaults or disable for now).
  • Accept terms of service.
  • Finish setup.

Step 6 Verifying the Installation

  • Web UI Access: Ensure you can log in to the Emby dashboard using the administrator account you created.
  • Container Status: Check if the container is running using sudo docker ps. You should see the emby container listed with status Up.
  • Logs (Optional): View the container logs for any errors using sudo docker logs emby or sudo docker-compose logs -f (from the directory with the docker-compose.yml).

Congratulations! You have successfully installed Emby Server using Docker.

2. Adding Media Libraries

With Emby Server installed, the next crucial step is to tell it where your media files are located and how they are organized. This involves creating "Libraries," which are logical collections of your media categorized by type (Movies, TV Shows, Music, etc.). Proper organization of your media files on disk is key to ensuring Emby can identify and fetch the correct metadata automatically.

Understanding Library Types (Movies, TV Shows, Music, Photos, etc.)

Emby supports various library types, each optimized for specific kinds of media content. When you add a new library, selecting the correct type is important because it tells Emby how to scan the files and which online databases (metadata providers) to query for information. Common library types include:

  • Movies: For feature films. Emby expects each movie file (or a folder containing the movie file and related extras) to represent a single movie. It fetches metadata like posters, backdrops, summaries, cast, ratings, etc., primarily from sources like The Movie Database (TMDb) or IMDb (via TMDb).
  • TV Shows: For episodic series. Emby expects a specific folder structure, typically Show Name/Season XX/Episode Files. It fetches metadata like series posters, season details, episode summaries, actors, etc., from sources like The TVDB or TMDb.
  • Music: For audio tracks and albums. Emby scans embedded tags (ID3 tags for MP3, Vorbis comments for FLAC/OGG, etc.) and uses online databases like MusicBrainz and AudioDB to fetch artist bios, album art, genres, etc.
  • Photos: For image files (JPG, PNG, GIF, etc.). Emby can display photos individually or in folders, often extracting EXIF data (date taken, camera model).
  • Home Videos & Photos: Similar to Photos, but treated more like personal recordings. Metadata fetching is typically minimal.
  • Books: For E-books (EPUB, MOBI, PDF, CBR/CBZ comics). Fetches metadata from sources like Google Books or ComicVine.
  • Mixed Content: A generic type for folders containing various media types. Metadata identification can be less reliable compared to specific types. Generally recommended to use specific types whenever possible.
  • Live TV: Requires specific configuration with a tuner device (like HDHomeRun) or an IPTV source (M3U playlist/XMLTV guide data) and usually an Emby Premiere subscription for full functionality including DVR.

Choosing the correct library type ensures the best possible presentation and metadata accuracy for your content.

Media Organization Best Practices

How you name and structure your media files and folders on your storage drives significantly impacts Emby's ability to automatically identify your content correctly. While Emby has some flexibility, adhering to recommended conventions saves considerable time and prevents manual correction later.

Movie Naming Conventions

The recommended practice is to place each movie file within its own folder named after the movie and its release year. The movie file itself should also be clearly named.

Recommended Structure:

/srv/data/movies/      <-- Your main movies directory added to Emby
    └── Movie Title (Year)/
        ├── Movie Title (Year) [Quality Info].ext
        ├── poster.jpg  (Optional: Local poster image)
        ├── fanart.jpg  (Optional: Local background image)
        ├── movie.nfo   (Optional: Local metadata file)
        └── Subs/       (Optional: Folder for external subtitles)
            └── Movie Title (Year).en.srt

Examples:

  • /srv/data/movies/Avatar (2009)/Avatar (2009) [1080p BluRay].mkv
  • /srv/data/movies/The Dark Knight (2008)/The Dark Knight (2008).mp4
  • /srv/data/movies/Blade Runner 2049 (2017)/Blade Runner 2049 (2017) - Bluray-1080p.mkv

Key Points:

  • Movie Name and Year: Include the full movie title and the release year in parentheses (YYYY). This is the most critical part for accurate identification. Use the name as listed on TMDb or IMDb.
  • Folder per Movie: While not strictly required (you can just dump files in the main folder), having a folder per movie is highly recommended for organization and allows for storing related files (artwork, subtitles, NFOs, extras) alongside the main movie file.
  • File Name: The file name should ideally also include the movie title and year. Additional information like resolution (1080p, 4K), source (BluRay, WEB-DL), and codecs can be included (often separated by dots or hyphens) but are primarily for your reference; Emby mainly uses the title and year for matching.
  • File Extension: Use the correct file extension (e.g., .mkv, .mp4, .avi).

TV Show Naming Conventions (Season/Episode Structure)

TV shows require a more hierarchical structure for Emby to correctly identify series, seasons, and individual episodes.

Recommended Structure:

/srv/data/tvshows/     <-- Your main TV shows directory added to Emby
    └── Series Title (Year)/
        ├── Season 01/
        │   ├── Series Title - S01E01 - Episode Title [Optional Quality].ext
        │   ├── Series Title - S01E02 - Episode Title [Optional Quality].ext
        │   └── ...
        ├── Season 02/
        │   ├── Series Title - S02E01 - Optional Info.ext
        │   ├── Series Title - S02E02 - Optional Info.ext
        │   └── ...
        ├── Specials/  (Or Season 00)
        │   └── Series Title - S00E01 - Special Name.ext
        ├── season. NFO   (Optional: Season-level metadata)
        ├── season##.tbn  (Optional: Season poster)
        ├── tvshow.nfo    (Optional: Series-level metadata)
        ├── poster.jpg    (Optional: Series poster)
        └── fanart.jpg    (Optional: Series background)

Examples:

  • /srv/data/tvshows/Game of Thrones (2011)/Season 01/Game of Thrones - S01E01 - Winter is Coming.mkv
  • /srv/data/tvshows/Breaking Bad (2008)/Season 05/Breaking Bad - S05E14 - Ozymandias [1080p].mp4
  • /srv/data/tvshows/The Mandalorian (2019)/Specials/The Mandalorian - S00E01 - Disney Gallery - Making of Season 1.mkv

Key Points:

  • Series Folder: A top-level folder for each show, ideally named Series Title (Year) using the title and first air year from TheTVDB or TMDb.
  • Season Folders: Subfolders named Season XX (e.g., Season 01, Season 02, ... Season 10). Use Specials or Season 00 for non-standard episodes (check TheTVDB for correct numbering).
  • Episode Files: The filename is critical. Use the format Series Title - SXXEYY - Episode Title.ext.
    • SXX: Season number with a leading zero (e.g., S01, S02, ... S11).
    • EYY: Episode number with a leading zero (e.g., E01, E02, ... E15).
    • Including the Series Title and optional Episode Title helps but SXXEYY is the most crucial part for matching.
  • Multi-Episode Files: For files containing multiple episodes (e.g., Show - S01E01-E02.mkv), name them accordingly. Emby can usually handle this.

Music File Tagging

For music libraries, while folder structure (Artist Name/Album Name/Track Files) is helpful for browsing, Emby primarily relies on embedded metadata tags within the audio files themselves (e.g., ID3 tags for MP3, Vorbis comments for FLAC/OGG, MP4 tags for M4A).

Key Tags for Emby:

  • Track Title
  • Artist Name
  • Album Title
  • Album Artist (Crucial for correctly grouping albums, especially compilations where track artists differ)
  • Track Number
  • Disc Number (For multi-disc albums)
  • Year/Date
  • Genre
  • Embedded Cover Art (Album artwork)

Tools for Tagging: Use dedicated music tagging software like MusicBrainz Picard (highly recommended, cross-platform, free), Mp3tag (Windows, free), or beets (command-line, powerful). These tools can automatically fetch correct tags and artwork from online databases like MusicBrainz. Ensuring your files have accurate embedded tags is the most important step for a well-organized Emby music library.

Adding Your First Library (e.g., Movies)

Once your files are reasonably organized, you can add the corresponding library in Emby.

  1. Navigate to Libraries: Log in to your Emby dashboard (http://<YourServerIP>:8096). In the left-hand menu (you might need to click the "hamburger" icon ☰ top-left), go to "Manage Server" (usually represented by a gear icon ⚙️). Then, click on "Library".
  2. Add Media Library: Click the "+ Add Media Library" button.
  3. Select Content Type: Choose the appropriate type from the list (e.g., "Movies").
  4. Name: Enter a display name for this library (e.g., "My Movies," "4K Films"). This is how it will appear in Emby clients.
  5. Folders: Click the "+ Add Folder" button. This is where you tell Emby where the media files are located from the server's perspective.
    • If using Docker (as per the workshop): You need to specify the path inside the container that you mapped in your docker-compose.yml. For example, if you mapped /srv/data/movies on your host to /data/movies in the container, you should enter /data/movies here. You can browse the container's filesystem using the folder browser that pops up.
    • If using Native Install: Browse to the actual path on your server's filesystem (e.g., /srv/data/movies or C:\Media\Movies).
  6. Configure Library Settings (Optional but Recommended): Scroll down to review the settings for this specific library. Key options include:
    • Preferred download language: Language for metadata (summary, titles).
    • Country: For content ratings (e.g., MPAA in the US, BBFC in the UK).
    • Metadata Savers: Choose which metadata files (NFO, images) Emby should save alongside your media files (if desired). Saving NFO files can serve as a backup of your metadata.
    • Metadata Readers: Configure Emby to read local NFO files if present (useful if you manage metadata externally).
    • Image Fetchers: Select and prioritize sources for artwork (posters, backdrops). TMDb, Fanart.tv are common choices.
    • Subtitle downloads: Configure automatic subtitle downloading (requires configuring subtitle plugins later).
    • Library Scan Settings: Configure how often Emby automatically scans for new or changed content.
  7. Confirm: Click "OK" to add the library.

Scanning Libraries and Metadata Fetching

After adding a library, Emby needs to scan the specified folders to find your media files and then fetch the corresponding metadata from the internet.

  1. Initial Scan: Emby usually starts scanning automatically after you add a new library. You can monitor the progress from the server dashboard (look for "Scan Media Library" tasks).
  2. Manual Scan: If it doesn't start automatically, or if you add new media later, you can trigger a manual scan. Go to "Library" in the server management section, click the three-dot menu (...) next to the library you want to scan, and select "Scan Library Files."
  3. Metadata Fetching: As Emby identifies files, it queues tasks to download metadata and artwork from the configured online sources (TMDb, TheTVDB, MusicBrainz, etc.). This process can take time, especially for large libraries, and depends on your internet connection speed and the responsiveness of the metadata providers.
  4. Monitoring Progress: You can see active tasks on the Emby Dashboard's main page or under "Scheduled Tasks" in the server management section.

Once the scan and metadata fetching are complete, you should see your media beautifully presented with posters, summaries, and other details when you browse the library through the main Emby interface or any Emby client app. If items are misidentified, check your file naming and folder structure first. You can also use the "Identify" function (usually found in the item's three-dot menu) to manually search for the correct match.

Workshop Organizing and Adding a Movie Library

This workshop provides a practical exercise in organizing a small set of sample movie files according to best practices and adding them as a library in your newly installed Emby server.

Prerequisites

  • Emby Server installed and running (as per the previous workshop).
  • Access to the Emby Web UI.
  • The host directory path you created for movies (e.g., /srv/data/movies from the Docker workshop) and the corresponding path inside the container (e.g., /data/movies).

Step 1 Preparing the Host Movie Directory

Ensure the main movie directory you mapped into your Emby container exists on the host system. If you followed the Docker workshop, this might be /srv/data/movies. Let's make sure it's empty to start clean for this workshop.

# Navigate to the parent directory
cd /srv/data/

# Remove any existing contents in the movies directory (Use with caution!)
sudo rm -rf movies/*

# Ensure the directory exists
sudo mkdir -p movies

# Re-apply ownership if needed (replace 1000:1000 with your UID:GID)
sudo chown 1000:1000 movies
sudo chmod 755 movies

Step 2 Obtaining Sample Movie Files (Legally)

For this workshop, you need a couple of movie files. Please use files you legally own (e.g., rips from your own DVDs/Blu-rays) or public domain films. Good sources for public domain films include the Prelinger Archives on archive.org.

Let's assume you've obtained two files:

  • Night of the Living Dead.mp4 (a well-known public domain film, released in 1968)
  • Big Buck Bunny.mkv (a popular open-source animated short, released in 2008)

Place these files temporarily somewhere accessible, like your user's Downloads folder.

Step 3 Organizing Movie Files on the Host

Now, organize these files according to the recommended naming conventions within your host movie directory (/srv/data/movies).

# Navigate to your host movies directory
cd /srv/data/movies

# Create a folder for Night of the Living Dead (1968)
sudo mkdir "Night of the Living Dead (1968)"

# Move and rename the first movie file into its folder
# Replace /path/to/your/downloads/ with the actual path
sudo mv /path/to/your/downloads/"Night of the Living Dead.mp4" "Night of the Living Dead (1968)/Night of the Living Dead (1968).mp4"

# Create a folder for Big Buck Bunny (2008)
sudo mkdir "Big Buck Bunny (2008)"

# Move and rename the second movie file into its folder
# Replace /path/to/your/downloads/ with the actual path
sudo mv /path/to/your/downloads/"Big Buck Bunny.mkv" "Big Buck Bunny (2008)/Big Buck Bunny (2008).mkv"

# Verify the structure
ls -R /srv/data/movies

# Expected output:
# /srv/data/movies:
# 'Big Buck Bunny (2008)'/  'Night of the Living Dead (1968)'/
#
# /srv/data/movies/Big Buck Bunny (2008):
# 'Big Buck Bunny (2008).mkv'
#
# /srv/data/movies/Night of the Living Dead (1968):
# 'Night of the Living Dead (1968).mp4'

# Ensure correct ownership and permissions again (important!)
sudo chown -R 1000:1000 /srv/data/movies
sudo chmod -R 755 /srv/data/movies

Step 4 Adding the Movie Library in Emby

  1. Open your Emby Web UI (http://<YourServerIP>:8096).
  2. Log in as the administrator.
  3. Click the gear icon ⚙️ (Manage Server) in the top right or side menu.
  4. Click "Library" in the left-hand navigation pane.
  5. Click the "+ Add Media Library" button.
  6. Content type: Select "Movies".
  7. Name: Enter a name, e.g., "Movies".
  8. Folders: Click the + button.
    • A folder browser window will appear, showing the filesystem inside the Emby container.
    • Navigate to the path you mapped for movies in your docker-compose.yml. Based on our workshop example, this should be /data/movies.
    • Select the movies folder under /data.
    • Click "OK". The path /data/movies should now appear in the Folders list.
  9. Review Settings (Optional): Scroll down and check settings like "Preferred download language" (set to English or your preference) and "Country" (set to your country for ratings). For this workshop, default settings are usually fine.
  10. Click "OK" at the bottom to save the new library.

Step 5 Initiating the Library Scan

Emby should automatically start scanning the library you just added.

  1. Go back to the main Emby Dashboard (click the Emby logo or "Dashboard" link).
  2. You should see activity indicating a library scan is in progress (e.g., "Scanning media library Movies," "Fetching metadata...").
  3. Alternatively, go back to Manage Server -> Library. You should see your "Movies" library listed. Click the three-dot menu (...) next to it and select "Scan Library Files" if it didn't start automatically or if you want to ensure it rescans.

Step 6 Verifying Metadata

  1. Wait for the scan and metadata fetching to complete (it should be quick for just two files).
  2. Click the "Home" icon (usually a house) in the top left to go back to the main user view.
  3. You should now see a "Movies" library section on your home screen (or under "My Media"). Click on it.
  4. You should see entries for "Big Buck Bunny" and "Night of the Living Dead," complete with posters, background art (fanart), summaries, cast/crew information (where available), and release years.

If the movies appear correctly identified with metadata, you have successfully organized your files and added your first Emby library! If not, double-check your folder/file names on the host system and the folder path you added within Emby library settings (ensuring it's the container path /data/movies). You can use the "Identify" option on a wrongly matched movie to manually search and correct it.

3. Basic User Management

Emby is designed for multi-user environments, allowing you to create separate profiles for different people in your household or even friends and family (if you set up remote access). Each user can have their own watch history, playback progress, home screen layout, and access permissions. Basic user management involves creating these profiles and setting simple access rules.

Creating User Profiles

Creating distinct user profiles is fundamental to personalizing the Emby experience.

  1. Access User Management: Log in to the Emby dashboard as an administrator. Navigate to Manage Server (⚙️) -> Users.
  2. Add User: Click the "+ New User" button.
  3. Username: Enter a unique username for the new user (e.g., "Alice," "Kids," "Guest").
  4. Password (Optional but Recommended): You can set a password to protect the user profile. If you leave it blank, the user can log in just by clicking their profile picture (useful for young children or local network users where security isn't paramount). For remote access or distinct watch histories, passwords are highly recommended.
  5. Profile Configuration: You'll see various tabs for configuring the user profile:
    • Profile: Set a display name (can be different from the username), upload a profile picture, and set language preferences.
    • Access: This is where you control what the user can see and do. We'll cover this next.
    • Parental Control: Configure content restrictions based on ratings.
    • Password: Change or set the user's password.
    • Home Screen: Customize the layout of the user's home screen (discussed later).
  6. Save: Click "Save" to create the user profile.

Repeat this process for each person who will be using your Emby server.

Setting Basic Access Permissions

The "Access" tab within a user's profile settings is where you control their permissions. For basic setup, the most important settings are:

  • Allow media playback: This should generally be checked unless you're creating an account solely for management purposes (though the built-in admin account usually covers this).
  • Administrator: Crucially, leave this unchecked for regular users. Only your primary management account(s) should have administrator privileges. Granting admin rights gives full control over the server, including settings, libraries, and other users.
  • Allow access to all libraries: By default, new users can access all media libraries you've created. You can uncheck this and then manually select which specific libraries this user should be able to see. For example, you might give children access to an "Animation" library but not your main "Movies" library containing R-rated films.
  • Allow remote connections to Emby server: Check this if you want the user to be able to connect from outside your home network (once remote access is configured). Leave it unchecked if the user should only have local access.
  • Enable media downloading and syncing: Allows the user to download files directly or sync content to their devices for offline viewing (Sync usually requires Emby Premiere). You might want to disable this for some users to save bandwidth or storage.
  • Allow Live TV access: Control access to Live TV features (if configured).

Start with simple permissions: allow playback, disallow administrator rights, allow access to all libraries (or select specific ones if needed), and decide on remote access based on your needs.

Understanding Parental Controls

Emby offers robust parental controls, essential for households with children. These settings are configured per user profile under the "Parental Control" tab:

  • Maximum Parental Rating: This is the core setting. Select the highest content rating (e.g., G, PG, PG-13, R based on your country's rating system configured in library settings) that this user is allowed to view. Any content rated higher than this will be hidden or blocked for the user.
  • Block items with no or unrecognized rating information: You can choose to block content that Emby couldn't fetch a rating for, providing a stricter filtering approach.
  • Allow access to specific content by Tags: You can tag specific movies or shows (e.g., "FamilyApproved") and then configure parental controls to either block or allow content based on these tags, offering fine-grained control beyond ratings. For example, you could block all R-rated movies except those you explicitly tag as "OKForTeen."
  • Access Schedule: Set time limits for when the user is allowed to access Emby (e.g., only between 4 PM and 8 PM on weekdays).

Parental controls are applied dynamically based on the metadata Emby has fetched for your media. Accurate metadata is therefore crucial for these controls to work effectively.

Workshop Creating User Accounts for Family Members

Let's create two common user types: a regular adult user and a child user with parental controls.

Prerequisites

  • Emby Server running and accessible.
  • Logged in as the administrator.
  • At least one media library added (e.g., the "Movies" library from the previous workshop). Ensure your library settings have a "Country" selected under Metadata -> Settings -> Display so that content ratings are fetched correctly. Re-scan the library if needed after setting the country.

Step 1 Accessing User Management

  1. In the Emby Web UI, click the gear icon ⚙️ (Manage Server).
  2. Click "Users" in the left-hand navigation menu. You should see your administrator account listed.

Step 2 Creating a New User (Adult)

  1. Click the "+ New User" button.
  2. Username: Enter Bob.
  3. Password: Enter a simple password for testing, e.g., password. Confirm it. (In a real scenario, use a strong password).
  4. Profile Tab:
    • Name (optional): You could enter Bob Smith.
  5. Access Tab:
    • Ensure "Allow media playback" is checked.
    • Ensure "Administrator" is unchecked.
    • Leave "Allow access to all libraries" checked for now.
    • Check "Allow remote connections to Emby server" if you plan for Bob to access remotely later, otherwise leave it unchecked.
    • Leave "Enable media downloading and syncing" checked or uncheck based on preference.
  6. Parental Control Tab: Leave everything blank/unrestricted for Bob.
  7. Click "Save". Bob's user profile is now created.

Step 3 Creating a New User (Child)

  1. Click the "+ New User" button again.
  2. Username: Enter Charlie.
  3. Password: Leave the password fields blank for easy access for a child on the local network.
  4. Profile Tab:
    • Name (optional): You could enter Charlie (Kid).
    • Consider uploading a child-friendly profile picture later.
  5. Access Tab:
    • Ensure "Allow media playback" is checked.
    • Ensure "Administrator" is unchecked.
    • Leave "Allow access to all libraries" checked for now (we'll use ratings to filter).
    • Leave "Allow remote connections" unchecked unless specifically needed and secured.
    • Consider unchecking "Enable media downloading and syncing".
  6. Parental Control Tab:
    • Maximum Parental Rating: Click the dropdown. Assuming your library is set to United States ratings, select something appropriate like PG or G. Let's choose PG. This means Charlie can only see content rated G or PG. Note: The effectiveness depends on Emby having fetched ratings for your media. "Night of the Living Dead (1968)" might be unrated or R, while "Big Buck Bunny (2008)" is likely G or unrated.
    • Block items with no or unrecognized rating information: You can optionally check this for stricter control if desired. Let's leave it unchecked for now to see how unrated content is handled.
  7. Click "Save". Charlie's user profile is created with parental restrictions.

Step 4 Testing the New User Accounts

  1. Log out of your administrator account (click your profile icon in the top right -> Logout).
  2. You should now see the Emby login screen showing icons for the Administrator, Bob, and Charlie.
  3. Test Bob:
    • Click on Bob's profile icon.
    • Enter the password (password).
    • Click "Sign In".
    • Browse the "Movies" library. Bob should be able to see both "Night of the Living Dead" and "Big Buck Bunny". Bob should not see the "Manage Server" (⚙️) icon.
    • Log out.
  4. Test Charlie:
    • Click on Charlie's profile icon. Since there's no password, Charlie should log in directly.
    • Browse the "Movies" library.
    • Expected Behavior: Charlie should likely only see "Big Buck Bunny" (assuming it's rated G or unrated and you didn't block unrated items). "Night of the Living Dead" (often considered R or unrated) should be hidden because the maximum allowed rating was set to PG. If both are visible, it might mean ratings weren't fetched correctly, or both happen to fall within the PG limit or are unrated. You might need to check the metadata for the specific movies in the admin view or adjust Charlie's rating limit.
    • Charlie should also not see the "Manage Server" (⚙️) icon.
    • Log out.

You have now successfully created different user profiles with varying levels of access and parental controls, demonstrating Emby's basic multi-user capabilities.

Intermediate Level

This section delves into customizing your Emby server's appearance and behavior, understanding the critical concept of playback and transcoding, and configuring network settings for remote access. These steps move beyond the basic setup to tailor Emby more closely to your preferences and environment.

4. Customization and Appearance

Emby offers a good degree of flexibility in how your server looks and feels, both for you as the administrator and for your users. Customizing the appearance, home screen layout, and metadata sources can significantly enhance the user experience.

Exploring Server Dashboard Settings

The Emby Server Dashboard (Manage Server ⚙️) is the central hub for all configurations. Spend some time exploring the various sections beyond Library and Users, which we've already touched upon:

  • Dashboard Home: Provides an overview of server status, active streams, recent media additions, and running scheduled tasks.
  • Settings:
    • General: Basic server settings like the server name visible on the network, preferred communication language, and cache path.
    • Users: Manage users, groups, profiles, parental controls, and passwords.
    • Library: Add/remove libraries, configure global library scan settings, manage metadata sources (providers for movies, TV, music), set NFO saving/reading preferences, and configure chapter image extraction.
    • Playback: Configure transcoding settings, including hardware acceleration, streaming quality limits, and subtitle options. (Covered in detail in the next section).
    • Devices: View and manage connected devices/clients, control access per device, and manage sync profiles (Premiere feature).
    • DLNA: Configure DLNA server settings for compatibility with older devices (often less feature-rich than using native Emby apps).
    • Live TV: Set up TV tuners (like HDHomeRun) or IPTV sources (M3U/XMLTV). Requires Emby Premiere for DVR.
    • Networking: Configure server ports, remote access (Emby Connect, public URLs), secure connections (HTTPS), local network addresses, and advanced options like custom headers. (Covered later).
    • Open Subtitles: Configure credentials for automatic subtitle downloading from OpenSubtitles.org (requires an account there).
    • Trakt: Integrate with Trakt.tv for scrobbling watch history (requires a Trakt account and plugin installation).
  • Plugins: Discover, install, and manage server plugins to extend functionality.
  • Scheduled Tasks: View, run manually, and configure schedules for tasks like library scans, metadata updates, database cleanup, and backups.
  • API Keys: Manage API keys for third-party applications integrating with Emby.
  • Logs: View and download server logs for troubleshooting.
  • Advanced: Access advanced/less commonly used settings like Caching, Branding (Premiere feature for custom CSS/HTML), and Performance tuning.

Familiarizing yourself with these sections will empower you to fine-tune your Emby experience.

Customizing the Home Screen Layout

Each Emby user can have a personalized home screen layout, controlling which sections appear and in what order. This is configured per-user.

  1. Access Home Screen Settings:
    • For your own user: While logged in, click your user profile icon (top right) -> Home Screen Settings.
    • For another user (as Admin): Go to Manage Server (⚙️) -> Users -> Select the user -> Home Screen tab.
  2. Manage Sections: You'll see a list of potential home screen sections (e.g., My Media, Continue Watching, Next Up (TV), Latest Movies, Latest TV Shows, Live TV, Suggestions).
  3. Enable/Disable: Use the checkboxes or toggle switches next to each section to enable or disable it for that user's home screen.
  4. Reorder: Use drag-and-drop handles (often represented by dots or lines) to change the order in which the enabled sections appear vertically on the home screen.
  5. My Media Customization: You can often further customize the "My Media" section itself, choosing which libraries appear directly as top-level rows (e.g., separate rows for "Movies," "TV Shows," "Kids Animation") or if they should be grouped under a single "My Media" heading. This might be under user profile settings or display settings depending on the Emby version and client.
  6. Save: Ensure you save the changes.

By customizing the home screen, you can prioritize the content types most relevant to each user, making navigation quicker and more intuitive. For example, a "Kids" user might have "Kids Animation" and "Family Movies" libraries prominently displayed, while "Continue Watching" and "Next Up" are hidden if they are too young to manage their watch progress.

Theme Installation and Configuration

Emby supports themes that can change the overall color scheme, fonts, and general appearance of the Web UI and potentially some client apps.

  1. Find Themes: Themes are often developed by the community and shared on the official Emby Community forums (look for a "Themes" or "Customization" section). Themes usually consist of CSS (Cascading Style Sheets) files or are distributed as plugins.
  2. Install Themes (via Plugin):
    • Go to Manage Server (⚙️) -> Plugins -> Catalog.
    • Search for "Theme" or browse the catalog for theme plugins (e.g., "Dark Theme," "Blue Radiance Theme").
    • Click on the desired theme plugin and click "Install."
    • Restart Emby Server when prompted.
    • After restarting, go to Manage Server (⚙️) -> Settings -> Display (or similar, the location might vary slightly). You should see a dropdown or selection area for installed themes. Choose the one you installed.
  3. Install Themes (via Custom CSS - Advanced):
    • Some themes are provided as just a CSS file.
    • You can apply custom CSS using the "Branding" feature (requires Emby Premiere) under Manage Server -> Advanced -> Branding.
    • Alternatively, some browser extensions (like Stylus) allow applying custom CSS to specific websites, but this only affects your browser, not other users or clients. Applying custom CSS directly via the Branding plugin is the server-wide method.
  4. Apply Theme: Select the desired theme in the server's display settings. The changes should apply immediately to the Web UI. Client app support for server-pushed themes can vary.

Themes allow you to personalize the visual experience, perhaps matching it to your operating system's dark mode or simply choosing a color palette you prefer.

Adjusting Metadata Fetcher Settings (Providers, Priorities)

Emby uses online databases (metadata providers) to fetch information about your media. You can control which providers are used and in what order Emby consults them.

  1. Access Metadata Settings: Go to Manage Server (⚙️) -> Library -> Metadata (sub-section, might be under "Settings").
  2. Select Media Type: You'll typically see tabs or dropdowns for different media types (Movies, Series, Music, Books, etc.). Select the type you want to configure (e.g., "Movies").
  3. Manage Providers: You'll see a list of available metadata providers for that content type (e.g., for Movies: "The Movie Database," "The Open Movie Database").
    • Enable/Disable: Check or uncheck the box next to each provider to enable or disable it. Generally, TMDb is the primary source for movies and TV shows.
    • Order/Priority: Use drag-and-drop handles to change the order. Emby will try to fetch metadata from the providers in the order listed. Place your most trusted or preferred provider at the top.
  4. Configure Fetchers: Below the provider list, you'll often find settings for specific "Metadata Fetchers" (which pieces of information to download) and "Image Fetchers" (where to get posters, backdrops, logos).
    • Metadata Fetchers: Choose which data points you want Emby to download (e.g., ratings, genres, keywords, trailers).
    • Image Fetchers: Enable/disable and prioritize sources for different image types (Primary Poster, Backdrop, Logo, etc.). Common sources include TMDb, Fanart.tv, TheTVDB. You can also configure preferred language for images if the source provides localized artwork.
  5. Save: Save your changes.
  6. Refresh Metadata (Optional): If you make significant changes to providers, you might want to perform a metadata refresh on your libraries (Library -> Three-dot menu -> Refresh Metadata) to apply the new settings, although this can be time-consuming for large libraries. Choose "Scan for new and updated files" first; a full refresh might only be needed if metadata seems incorrect or incomplete.

Fine-tuning metadata providers allows you to prioritize sources you trust more, potentially improving the accuracy and richness of the information displayed for your media. For example, if you prefer Fanart.tv for high-quality backgrounds, you can prioritize it for backdrop images.

Workshop Customizing the Emby Look and Feel

This workshop focuses on applying a theme and customizing the home screen for a user.

Prerequisites

  • Emby Server running and accessible.
  • Logged in as the administrator.
  • At least one library and one non-admin user created (e.g., "Bob" from the previous workshop).

Step 1 Accessing Display Settings

  1. Log in to Emby as the administrator.
  2. Click the gear icon ⚙️ (Manage Server).
  3. In the left-hand menu, click "Settings".
  4. Click "Display" (or look for a similar option related to appearance).

Step 2 Changing the Theme

Let's install and apply a common theme from the plugin catalog. We'll use a hypothetical "Dark Theme" plugin (the exact name might vary, search the catalog).

  1. Navigate to "Plugins" in the left-hand menu.
  2. Click on "Catalog".
  3. In the search bar or by scrolling, look for a theme plugin. Common examples might be named "Dark," "Black," "Graphite," "Blue Radiance," etc. Let's assume you find one called "Emby Dark Theme."
  4. Click on the "Emby Dark Theme" plugin.
  5. Click the "Install" button. Wait for the installation to complete.
  6. Emby will likely prompt you to restart the server. Click "Restart Now" or do it manually (e.g., sudo docker-compose restart emby if using Docker Compose).
  7. Wait for Emby to restart and become accessible again. Log back in as administrator.
  8. Navigate back to Manage Server (⚙️) -> Settings -> Display.
  9. You should now see a "Dashboard theme" dropdown (or similar). Click it and select the "Emby Dark Theme" (or the name of the theme you installed).
  10. Click "Save" at the bottom of the Display settings page.
  11. The Web UI should immediately switch to the dark theme.

Step 3 Customizing the Home Screen Sections (for User Bob)

Let's tailor Bob's home screen to prioritize TV shows and hide suggestions.

  1. Navigate to "Users" in the left-hand menu.
  2. Click on the user "Bob".
  3. Select the "Home Screen" tab.
  4. You'll see a list like "My Media," "Continue Watching," "Next Up," "Latest Movies," "Latest TV Shows," "Suggestions," etc.
  5. Reorder: Let's say Bob watches more TV. Drag "Next Up" and "Latest TV Shows" above "Latest Movies".
  6. Disable: Uncheck the box next to "Suggestions" to hide that section.
  7. Enable/Reorder My Media: Ensure "My Media" is checked. You might have options here to show libraries individually. If so, ensure "Movies" and "TV Shows" (if you added a TV library) are enabled and perhaps drag "TV Shows" to appear before "Movies" in this specific list if applicable.
  8. Click "Save" at the bottom.

Step 4 Testing the Changes (Log in as Bob)

  1. Log out from the administrator account.
  2. Log in as "Bob".
  3. Verify Theme: Bob's view should also use the Dark Theme you applied server-wide (most themes apply globally).
  4. Verify Home Screen: Examine Bob's home screen. You should see the sections reordered according to your changes in Step 3 (e.g., "Next Up" and "Latest TV Shows" should appear higher up, and the "Suggestions" section should be gone). The "My Media" section might also reflect any specific library ordering you set.

Step 5 (Optional) Installing a Custom CSS Snippet (Example using Branding - Requires Premiere)

If you have Emby Premiere and want finer control, you can add custom CSS.

  1. Obtain CSS: Find a small CSS snippet online, e.g., one that hides the small "Premiere" badge in the dashboard header (just as an example):
    /* Hide Emby Premiere badge in header */
    .headerPremiereIcon { display: none !important; }
    
  2. Access Branding: Log in as Admin, go to Manage Server (⚙️) -> Advanced (you might need to scroll down) -> Branding.
  3. Paste CSS: Paste the CSS snippet into the "Custom CSS" text area.
  4. Save: Click "Save".
  5. Verify: Refresh the page. The Premiere badge (if it was visible) should now be hidden in the dashboard header. Note: This is just an example; explore the Emby forums for more useful CSS snippets. If you don't have Premiere, this Branding menu won't be available or saving will fail.

You have now successfully customized the Emby appearance using themes and adjusted the home screen layout for a specific user, making the interface more personalized and user-friendly.

5. Playback and Transcoding Explained

Understanding how Emby handles media playback is crucial for optimizing performance and ensuring a smooth viewing experience for your users. The key concepts revolve around Direct Play, Direct Stream, and Transcoding, heavily influenced by codecs and client compatibility.

Direct Play vs. Direct Stream vs. Transcoding

When a user hits "play" on an Emby client, the server and client negotiate how the media file should be delivered. There are three main possibilities:

  1. Direct Play:

    • What it is: The ideal scenario. The client device natively supports the video codec (e.g., H.264, HEVC/H.265), audio codec (e.g., AAC, AC3, DTS), and the container format (e.g., MKV, MP4) of the media file. The Emby server simply sends the original file directly to the client with minimal overhead.
    • Pros: Highest possible quality (original file), virtually zero CPU load on the server.
    • Cons: Requires the client device to be fully compatible with the media file's specifications.
    • When it happens: When using powerful clients (like Nvidia Shield, Apple TV 4K, Desktop PCs with capable media players/browsers) playing common formats they support, often on a high-bandwidth local network.
  2. Direct Stream:

    • What it is: A close second-best. The client supports the underlying video and audio codecs, but not the container format (e.g., the client supports H.264 video and AAC audio, but cannot play .mkv files directly, only .mp4). Emby server remuxes the file on-the-fly, changing the container format (e.g., from MKV to MP4) without re-encoding the video or audio streams.
    • Pros: Maintains original video and audio quality, very low CPU load on the server (much less than transcoding).
    • Cons: Slightly more overhead than Direct Play, still requires client compatibility with the core codecs.
    • When it happens: Often when streaming to web browsers or certain mobile devices that prefer specific containers like MP4 or HLS (HTTP Live Streaming).
  3. Transcoding:

    • What it is: The most resource-intensive option. The client device does not support the video codec, audio codec, or both. Emby Server must decode the original stream(s) and re-encode them in real-time into a format the client can understand. This can also happen due to bandwidth limitations (server needs to send a lower bitrate version) or subtitle burning (converting image-based subtitles like PGS into the video stream).
    • Pros: Ensures playback compatibility on almost any device, allows adjusting quality based on network bandwidth, enables subtitle burning.
    • Cons: Very high CPU load on the server (especially for high-resolution video like 4K or HEVC/H.265), potential loss of quality due to re-encoding, can introduce slight delay/buffering initially.
    • When it happens: Streaming high-efficiency codecs (HEVC) to older devices that only support H.264, playing high-bitrate files over a low-bandwidth remote connection, playing formats with incompatible audio tracks (e.g., DTS-HD MA to a stereo-only client), or when image-based subtitles (PGS, VOBSUB) are selected and the client cannot overlay them directly.

Monitoring Playback: You can see how media is being played by checking the Emby Server Dashboard while a stream is active. It will show active streams and indicate whether they are Direct Playing, Direct Streaming, or Transcoding (often showing details like the reason for transcoding and the transcoding progress/speed).

Understanding Codecs (H.264, H.265/HEVC, AAC, AC3, etc.)

Codecs (Coder-Decoder) are algorithms used to compress and decompress digital media data. Understanding common codecs helps predict playback behavior:

  • Video Codecs:
    • H.264 (AVC - Advanced Video Coding): The most widely compatible video codec. Supported by virtually all modern devices, browsers, and streaming boxes. Relatively efficient, but less so than newer codecs for the same quality. Easier to decode (less CPU intensive for clients).
    • H.265 (HEVC - High Efficiency Video Coding): A newer, more efficient codec. Offers roughly the same quality as H.264 at about half the bitrate, making it ideal for 4K content and saving storage space/bandwidth. However, it's not universally supported by all devices (especially older ones) and requires more processing power to decode. Transcoding from HEVC is CPU-intensive for the server if the client doesn't support it.
    • VP9: Google's open and royalty-free alternative to HEVC, often used by YouTube. Good efficiency, support is growing but less widespread than H.264 or HEVC.
    • AV1: The newest royalty-free codec, aiming for even better efficiency than HEVC/VP9. Support is still limited to the latest hardware and software but is expected to grow significantly. Very computationally expensive to encode/decode currently.
    • Older Codecs (MPEG-2, DivX, Xvid): Less common now, may require transcoding on many modern clients.
  • Audio Codecs:
    • AAC (Advanced Audio Coding): Very common, widely compatible, good quality for its bitrate. Often used in MP4 files and streaming. Generally Direct Plays on most clients.
    • AC3 (Dolby Digital): Common standard for surround sound (5.1 channels) used on DVDs and many streaming services. Good compatibility, especially with home theater receivers and soundbars. May require transcoding to AAC/Stereo for clients without AC3 support (e.g., some web browsers, mobile devices without specific licenses).
    • E-AC3 (Dolby Digital Plus): An enhanced version of AC3, often used for streaming services to deliver higher quality surround sound. Compatibility is good but slightly less universal than AC3.
    • DTS (Digital Theater Systems): Another popular surround sound format, common on Blu-rays. Requires specific hardware decoders; many TVs and mobile devices lack native DTS support and will force Emby to transcode it (usually to AAC or AC3).
    • DTS-HD MA / Dolby TrueHD: Lossless, high-resolution audio codecs found on Blu-rays. Require capable A/V receivers for decoding. Will almost always be transcoded by Emby unless the client specifically supports passthrough to a capable receiver.
    • MP3: Standard for music, universally compatible for audio-only files.
    • FLAC / ALAC: Lossless audio codecs popular for music archives. Compatibility is good on many devices but not universal; may sometimes require transcoding for specific clients (e.g., to AAC). Opus: A very efficient, royalty-free codec increasingly used for streaming and VOIP. Good quality, growing support.

Client device capabilities are key. A powerful HTPC or streaming box (Nvidia Shield, Apple TV 4K) might Direct Play almost anything, while a simple Smart TV app or web browser might force transcoding for HEVC video or DTS audio.

Configuring Transcoding Settings

You can manage how Emby handles transcoding via Manage Server (⚙️) -> Settings -> Playback -> Transcoding.

Hardware Acceleration (Intel Quick Sync Video - QSV, NVIDIA NVENC)

This is the single most important setting if your server hardware supports it and you anticipate needing to transcode, especially HEVC or 4K content. Hardware acceleration uses dedicated silicon on the CPU (Intel integrated graphics) or GPU (NVIDIA/AMD cards) to perform video encoding/decoding, drastically reducing CPU load.

  1. Check Hardware Support: Ensure your CPU (Intel Core series, usually 2nd gen "Sandy Bridge" or newer for H.264, newer generations like 7th gen "Kaby Lake" or later needed for good HEVC support) or GPU (NVIDIA GeForce GTX/RTX series, check NVENC generation support) is capable.
  2. Install Drivers/Runtime (Host): Ensure appropriate drivers (Intel graphics drivers for Linux/Windows, NVIDIA drivers + potentially nvidia-docker2 for Docker on Linux) are installed on the host machine.
  3. Enable in Emby:
    • Go to the Transcoding settings page.
    • Find the "Hardware acceleration" dropdown. Select your available hardware accelerator (e.g., "Intel QuickSync (QSV)," "NVIDIA NVENC," "VAAPI" on Linux).
    • Emby Premiere May Be Required: Full hardware acceleration capabilities (especially encoding) often require an active Emby Premiere subscription. Without Premiere, hardware decoding might work, but encoding might fall back to CPU (software).
    • Configure Codecs: Check the boxes for video codecs you want to accelerate decoding/encoding for (e.g., H.264, HEVC, VP9). Prioritize HEVC decoding if your clients don't support it natively.
    • Enable hardware encoding: Ensure this option is checked if available and desired (requires Premiere).
  4. Docker Considerations: If using Docker, you must pass the relevant hardware device(s) from the host into the container (e.g., --device=/dev/dri:/dev/dri for Intel QSV/VAAPI on Linux, or using the NVIDIA runtime for NVENC) as shown in the Docker Compose workshop example.

Transcoding Quality and Speed Settings

  • Transcoding preset: Controls the trade-off between encoding speed and quality/file size. Options range from Very Fast (lowest quality, lowest CPU usage if software encoding) to Very Slow (highest quality, highest CPU usage). Hardware acceleration often has its own presets. Start with a balanced preset like Medium or Fast, or the default recommended for your hardware accelerator.
  • Transcoding thread count: Set how many CPU threads Emby can use for software transcoding. Setting it too high can starve other system processes; setting it too low can bottleneck transcoding speed. 0 usually means auto-detect based on CPU cores. Adjust if you experience issues. Hardware acceleration mostly bypasses this limit for the accelerated parts.
  • Enable throttling: Allows Emby to slow down transcoding if it's encoding much faster than the client is consuming data. This saves CPU resources when transcoding ahead is not necessary. Generally recommended to leave enabled.

Temporary Transcoding Path

  • Transcode temporary path: Specify a directory where Emby stores temporary transcoded file segments during playback.
    • Performance: This directory should ideally be on a fast drive (SSD is highly recommended) with plenty of free space (several GB per active transcode stream, especially for high-bitrate content). Using a slow HDD can cause buffering.
    • RAM Disk (Advanced): For maximum performance, some users set up a RAM disk (a portion of system RAM treated as a virtual drive) for the transcode path. This requires sufficient RAM and careful setup, as the data is lost on reboot.
    • Docker: If using Docker, ensure the container path specified here points to a volume mapped to a suitable fast storage location on your host. For example, you might map /tmp/transcode inside the container to /mnt/ssd/emby_transcode on the host.

Client Compatibility Considerations

Understanding your client devices is key to minimizing transcoding:

  • Check Client Specs: Know which video/audio codecs your main viewing devices (TVs, streaming boxes, phones) support natively.
  • Use Native Emby Apps: Generally, dedicated Emby apps (for Android TV, Apple TV, iOS, etc.) offer better codec support and features than accessing Emby through a web browser or generic DLNA.
  • Configure Client Settings: Emby client apps often have their own settings for maximum streaming quality (local and remote), subtitle handling (allowing direct rendering vs. burning), and sometimes codec preferences. Ensure these are set appropriately (e.g., set local quality to "Original" or a high bitrate if your network can handle it).
  • Optimize Media: If you consistently find a specific format requires transcoding (e.g., HEVC video or DTS audio) and your server struggles, you might consider pre-converting problematic media files to a more compatible format (like H.264 video and AAC/AC3 audio) using tools like HandBrake. This requires storage space but guarantees Direct Play on more clients.

By understanding the interplay between server capabilities (especially hardware acceleration), client support, network bandwidth, and media formats, you can configure Emby for the best possible playback experience.

Workshop Configuring Hardware Acceleration (Intel QSV Example)

This workshop demonstrates enabling Intel Quick Sync Video (QSV) hardware acceleration for transcoding in an Emby Docker setup on Linux. This significantly reduces CPU usage during transcoding tasks.

Prerequisites

  • Emby Server running in Docker on a Linux host (as per Workshop 1).
  • An Intel CPU with integrated graphics supporting Quick Sync Video (generally 2nd Gen Core "Sandy Bridge" or newer, check Intel ARK website for your specific CPU model). Kaby Lake (7th gen) or newer recommended for HEVC 10-bit support.
  • Intel graphics drivers installed and loaded on the Linux host.
    • On Ubuntu/Debian: sudo apt update && sudo apt install intel-media-va-driver-non-free i965-va-driver vainfo
    • Verify installation: Run vainfo. You should see output listing supported VA-API entrypoints (like VAProfileH264..., VAProfileHEVC...). If vainfo command is not found, install vainfo package. If it shows errors, troubleshoot driver installation.
  • Your docker-compose.yml file from Workshop 1.
  • Emby Premiere subscription (recommended for full hardware encoding capabilities, though hardware decoding might work without it).

Step 1 Verifying Hardware Support and Drivers (Host OS)

  1. Check CPU: Know your Intel CPU model (e.g., using lscpu | grep "Model name"). Check on ark.intel.com if it supports Quick Sync Video.
  2. Check Graphics Device: List rendering devices:
    ls -l /dev/dri
    
    You should typically see renderD128 (and maybe card0). Note the group ownership of these files (often render or video).
  3. Check Driver Status: Run the vainfo command:
    vainfo
    
    Look for output indicating successful initialization and a list of supported profiles (e.g., VAProfileH264Main, VAProfileHEVCMain, VAProfileHEVCMain10 for HEVC 10-bit). If you see errors like "cannot open display" or "failed to initialize VAAPI", your drivers might not be set up correctly.

Step 2 Passing the GPU Device to the Docker Container

We need to modify the docker-compose.yml file to grant the Emby container access to the host's graphics device (/dev/dri).

  1. Edit the Docker Compose file:
    cd /opt/emby/ # Or wherever your docker-compose.yml is located
    sudo nano docker-compose.yml
    
  2. Add the devices section: Add the following lines under the emby service definition (ensure correct indentation, aligned with volumes, ports, etc.):

    # ... other service definitions ...
    ports:
      - "8096:8096"
      # ... other ports ...
    devices:                            # <--- ADD THIS SECTION
      - /dev/dri:/dev/dri             # <--- ADD THIS LINE
    restart: unless-stopped
    # ... rest of file ...
    
  3. Ensure Correct Permissions (Optional but Recommended): The user inside the container (defined by PUID/PGID) needs permission to access /dev/dri. Find the group ID (GID) that owns /dev/dri/renderD128 on the host (e.g., using ls -l /dev/dri). Let's say the group is render with GID 109. You can either:

    • Add the container user (PUID 1000 in our example) to this group inside the container (more complex).
    • Easier: Add the host user corresponding to your PUID (e.g., the user with UID 1000) to the render (or video) group on the host system:
      # Replace 'render' with the actual group name if different (e.g., 'video')
      # Replace 'your_username' with the username corresponding to PUID 1000
      sudo usermod -aG render your_username
      # You might need to log out and log back in on the host for the group change to take effect fully.
      
      Alternatively, some prefer adding the PGID used in the container as a group_add entry in the compose file (syntax might vary slightly). For linuxserver/emby, setting the PGID correctly might suffice if the host group permissions allow group access.
  4. Save and Close the docker-compose.yml file (Ctrl+X, Y, Enter).

  5. Recreate the Container: Apply the changes by running:
    sudo docker-compose up -d --force-recreate
    
    This stops, removes, and recreates the Emby container using the updated configuration, while keeping your persistent /config volume intact.

Step 3 Enabling Hardware Acceleration in Emby Settings

  1. Log in to your Emby Web UI as administrator.
  2. Go to Manage Server (⚙️) -> Settings -> Playback -> Transcoding.
  3. Select Hardware Acceleration: Find the "Hardware acceleration" dropdown menu. You should now see options like VAAPI (Video Acceleration API, common on Linux for Intel/AMD), possibly Intel QuickSync (QSV). Select VAAPI (generally preferred for Linux/Intel).
  4. Configure Options:
    • Check the boxes for codecs you want to accelerate. Prioritize HEVC decoding (e.g., Enable hardware decoding for HEVC). Also enable H.264 if desired.
    • Enable hardware encoding: Check this box (requires Emby Premiere). If enabled, choose which codecs Emby should encode using hardware (typically H.264).
    • You might see options for specific device selection if multiple are detected; usually, the default is fine.
    • Review other settings like "Hardware decoding requires video stream copying?" (leave default unless troubleshooting) and quality/preset options specific to VAAPI.
  5. Save: Scroll down and click "Save".

Step 4 Testing Transcoding Performance

Now, let's trigger a transcode and observe the difference. You'll need a media file that is likely to be transcoded. A 4K HEVC file played on a browser or device that only supports H.264 is a good candidate. Or, simply force transcoding by setting a lower quality/bitrate in the client.

  1. Find Test Media: Identify a file in your library that uses HEVC or a high bitrate H.264 format.
  2. Initiate Playback: Play this file using a client that will likely cause transcoding (e.g., a web browser like Chrome or Firefox on a desktop).
  3. Force Transcoding (Optional): During playback in the web client, click the gear icon in the player controls, select "Quality," and choose a lower resolution/bitrate (e.g., 720p - 4 Mbps). This should force Emby to transcode.
  4. Monitor Server CPU: While the stream is playing and transcoding (not Direct Playing), monitor the CPU usage on your Emby server host machine. Use tools like htop or top in the Linux terminal.
    • Without Hardware Acceleration: You would typically see one or more ffmpeg processes consuming a very high percentage of CPU (potentially 80-100% per core involved).
    • With Hardware Acceleration: The CPU usage by ffmpeg should be significantly lower (perhaps 10-30%, depending on the specific task and hardware), as the heavy lifting is offloaded to the Intel GPU. You might see slightly increased activity in GPU-related processes if your monitoring tool shows them.
  5. Check Emby Dashboard: Go to the Emby Dashboard (main page). Under "Activity," find the active stream. Click the "i" (info) icon. It should show details about the playback session. Look for indications that transcoding is active and potentially mentions of the hardware accelerator being used (e.g., Decoder: hevc_vaapi, Encoder: h264_vaapi). The exact wording may vary.

Step 5 Monitoring Transcoding Activity (Emby Logs)

For more detailed verification, check the Emby transcode logs.

  1. Go to Manage Server (⚙️) -> Logs.
  2. Look for logs named similar to ffmpeg-transcode-....log. Open a recent one corresponding to your test playback session.
  3. Search within the log file for lines containing vaapi (or qsv if you selected that). You should find lines indicating the hardware decoder/encoder being initialized and used, like:
    • Using hardware decoding context: vaapi
    • Stream mapping: (Look for -> h264_vaapi or similar if hardware encoding is active)
    • [hevc_vaapi @ ... ] (Indicating VAAPI is decoding HEVC)

If you see significantly lower CPU usage during transcoding compared to before, and the Emby dashboard/logs confirm hardware acceleration is active, you have successfully configured Intel QSV for your Emby Docker setup!

6. Networking and Remote Access

By default, your Emby server is only accessible from devices on the same local network (LAN). To access your media library from outside your home (e.g., on your phone while traveling, or sharing with family elsewhere), you need to configure remote access. This involves understanding basic networking concepts like IP addresses, ports, and potentially using tools like Dynamic DNS and reverse proxies.

Understanding Local Network Access

When you install Emby, it listens for incoming connections on specific network ports. The primary port for the web UI and most client connections is TCP port 8096 (HTTP) by default. An optional TCP port 8920 is used if you enable HTTPS directly within Emby.

On your local network, devices find each other using private IP addresses (usually in ranges like 192.168.x.x, 10.x.x.x, or 172.16.x.x - 172.31.x.x). Your Emby server has a private IP address assigned by your router (e.g., 192.168.1.100). Any device connected to the same router (via Wi-Fi or Ethernet) can access Emby by navigating to http://<ServerPrivateIP>:8096 (e.g., http://192.168.1.100:8096).

Emby clients also use discovery protocols (like UDP broadcast on port 7359) to automatically find the server on the local network, simplifying the initial connection process for users.

Setting Up Remote Access (Port Forwarding)

To make your Emby server accessible from the internet, you need to bridge the gap between your server's private IP address and your network's public IP address (the one assigned by your Internet Service Provider - ISP). The most common method is Port Forwarding.

Concept: Port forwarding tells your router: "Any traffic that arrives from the internet on a specific external port (e.g., TCP 8096) should be forwarded to the internal private IP address and port of the Emby server (e.g., 192.168.1.100 on port 8096)."

Finding Your Server's Local IP Address

You need to know the stable private IP address of the machine running Emby.

  • Linux: Use ip a or hostname -I.
  • Windows: Use ipconfig in Command Prompt.
  • macOS: Use ifconfig in Terminal or check System Preferences -> Network.

Static IP / DHCP Reservation: It's highly recommended to configure your router's DHCP server to always assign the same private IP address to your Emby server (DHCP reservation based on the server's MAC address) or configure a static IP address on the server itself (outside the router's DHCP range). This prevents the server's IP from changing, which would break the port forwarding rule. Consult your router's manual for instructions on DHCP reservations.

Configuring Your Router for Port Forwarding (Port 8096 TCP)

The exact steps vary greatly depending on your router's make and model, but the general process is:

  1. Access Router Settings: Open a web browser and navigate to your router's administration interface (commonly http://192.168.1.1 or http://192.168.0.1). You'll need the router's admin username and password.
  2. Find Port Forwarding Section: Look for settings labeled "Port Forwarding," "Virtual Server," "Application Forwarding," or similar (often under "Advanced Settings," "Firewall," or "NAT").
  3. Create a New Rule: Add a new port forwarding rule with the following information:
    • Application Name/Description: Enter something descriptive (e.g., "Emby Server").
    • External Port / Public Port: Enter 8096. This is the port the internet will connect to.
    • Internal Port / Private Port: Enter 8096. This is the port Emby is listening on internally. (It's possible to use different external and internal ports, but keeping them the same simplifies things).
    • Protocol: Select TCP. (Some routers might require separate rules or allow selecting TCP/UDP or Both. Emby primarily uses TCP for streaming, but some discovery features might use UDP. Start with TCP 8096).
    • Internal IP Address / Device IP: Enter the static private IP address of your Emby server machine (e.g., 192.168.1.100). You might be able to select the device from a list if you set up a DHCP reservation.
    • Enable/Activate: Make sure the rule is enabled.
  4. Save/Apply: Save the new rule and apply the changes. The router might reboot.

Security Note: Opening ports to the internet inherently carries some risk. Ensure your Emby server software is kept up-to-date, use strong passwords for your Emby users (especially the admin), and consider using HTTPS (discussed below).

Dynamic DNS (DDNS) for Dynamic Public IPs

Most residential ISPs assign dynamic public IP addresses, meaning your internet-facing IP address can change periodically (e.g., when your router restarts or the lease expires). If your public IP changes, your remote access using the IP address will break.

Solution: Dynamic DNS (DDNS) DDNS services provide you with a fixed hostname (e.g., my-emby-server.duckdns.org) that automatically updates to point to your current public IP address.

  1. Choose a DDNS Provider: Many options exist, some free, some paid. Popular free choices include DuckDNS, No-IP (free tier requires monthly confirmation), Dynu. Paid options include Google Domains (if you have a domain there), Cloudflare (if using them for DNS), etc.
  2. Sign Up and Create Hostname: Register with the provider and create a unique hostname.
  3. Set up Update Client: You need a way to tell the DDNS provider whenever your public IP address changes. This is usually done by:
    • Router Support: Many routers have built-in support for common DDNS providers. Check your router settings for a DDNS section and configure it with your provider details (hostname, username/token). This is the easiest method if available.
    • Software Client: If your router doesn't support your provider, you can run a small software client on your Emby server or another always-on machine on your network. This client periodically checks your public IP and updates the DDNS service if it changes. DuckDNS provides simple scripts for various platforms. Docker containers for updating DDNS are also readily available (e.g., linuxserver/duckdns).
  4. Access Emby Remotely: Once DDNS is set up and updating correctly, you (and your remote users) can access Emby using the hostname instead of the changing IP address: http://your-chosen-hostname.ddns.net:8096.

Reverse Proxies (Nginx Proxy Manager, Traefik, Caddy)

While port forwarding works, accessing your Emby server via http://your-hostname.ddns.net:8096 is not ideal:

  • HTTP is Insecure: Your login credentials and potentially streaming data are sent unencrypted over the internet.
  • Port Number is Clunky: Remembering and typing the port number :8096 is inconvenient.
  • Multiple Services: If you host other services, you'll need to open and forward ports for each one, increasing your exposure.

Solution: Reverse Proxy A reverse proxy is a server that sits in front of your Emby server (and potentially other web services on your network). It acts as an intermediary, receiving requests from the internet and forwarding them to the appropriate internal service.

Benefits:

  1. HTTPS/SSL Encryption: Reverse proxies make it easy to obtain and automatically renew free SSL certificates (e.g., from Let's Encrypt). This allows you to access Emby securely via https://your-emby-domain.com. All traffic between the client and the proxy is encrypted.
  2. Clean URLs (No Port Number): You can configure the proxy to handle requests on standard ports (80 for HTTP, 443 for HTTPS). Users can then access Emby via a clean URL like https://emby.yourdomain.com without needing the :8096. The proxy handles forwarding the request internally to http://<YourServerIP>:8096.
  3. Centralized Access Point: Manage access and SSL for multiple self-hosted services through one interface. You only need to forward ports 80 and 443 to the reverse proxy server.
  4. Security Enhancements: Can provide additional security features like access control, rate limiting, web application firewall (WAF) capabilities, and hiding internal server details.
  5. Load Balancing (Advanced): Can distribute load across multiple instances of an application (not typically needed for a single Emby instance).

Popular Reverse Proxy Options (Often run in Docker):

  • Nginx Proxy Manager (NPM): Very user-friendly web interface for managing Nginx as a reverse proxy. Easy setup for proxy hosts and Let's Encrypt SSL certificates. Great for beginners.
  • Traefik: Powerful, cloud-native reverse proxy that automatically discovers services (especially Docker containers) using labels, simplifying configuration. Steeper learning curve than NPM but very automated once set up.
  • Caddy: Modern web server with automatic HTTPS configuration by default. Known for its simple configuration file format.

Basic Reverse Proxy Configuration Concept (Example using NPM):

  1. Set up Reverse Proxy: Install Nginx Proxy Manager (e.g., in Docker), forwarding ports 80 and 443 from your router to the NPM container's host machine.
  2. Point Domain/Subdomain: Ensure your DDNS hostname or custom domain (e.g., emby.yourdomain.com) points to your public IP address.
  3. Create Proxy Host in NPM:
    • Log in to the NPM web UI.
    • Go to Proxy Hosts -> Add Proxy Host.
    • Domain Names: Enter emby.yourdomain.com (or your DDNS hostname).
    • Scheme: Select http.
    • Forward Hostname / IP: Enter the private IP address of your Emby server (e.g., 192.168.1.100).
    • Forward Port: Enter 8096.
    • Enable Block Common Exploits and Websockets Support. Websockets are crucial for Emby's real-time communication.
    • SSL Tab: Select "Request a new SSL Certificate" (Let's Encrypt), agree to terms, and Save.
  4. Access Emby Securely: You should now be able to access Emby securely via https://emby.yourdomain.com. NPM handles the SSL termination and forwards the request internally to Emby over HTTP.

Note: When using a reverse proxy for HTTPS, you generally don't need to enable HTTPS within Emby's own network settings (on port 8920). Let the proxy handle the SSL encryption externally. You may need to configure Emby's Network settings under "Public HTTPS port number" (set to 443) and potentially adjust "Secure connection mode" if you experience playback issues, but often the default works once the proxy is correctly forwarding requests.

Emby Connect (Cloud-Assisted Access)

Emby offers a built-in, simpler alternative for remote access called Emby Connect.

  • How it Works: You sign up for a free Emby Connect account online. You then link your Emby Server to this account within the server's dashboard (Settings -> Emby Connect). Users can then log in to Emby apps using their Emby Connect credentials instead of the server's direct address. Emby's servers help broker the connection between the client and your server.
  • Pros: Easier setup than manual port forwarding/DDNS/reverse proxy. Doesn't require opening ports on your router (usually relies on relaying or NAT traversal techniques). Free to use.
  • Cons: Relies on Emby's cloud infrastructure (potential privacy concern for some). Connections might be relayed through Emby's servers if a direct connection cannot be established, potentially adding latency or limiting bandwidth. Less control over the connection path and security compared to a reverse proxy. May not work reliably in all network environments (e.g., Carrier-Grade NAT).

To Use Emby Connect:

  1. Create an Emby Connect account at app.emby.media.
  2. On your Emby Server: Manage Server (⚙️) -> Settings -> Emby Connect. Click "Link Server" and sign in with your Emby Connect credentials.
  3. On Client Apps: When logging in, choose the "Sign in with Emby Connect" option and use the Emby Connect username/password.

Emby Connect is a convenient option, especially for less technical users, but a reverse proxy setup offers more performance, security, and control for advanced users.

Workshop Setting Up Remote Access via Port Forwarding and DDNS

This workshop guides you through the process of making your Emby server accessible from the internet using traditional port forwarding on your router and setting up a free Dynamic DNS hostname with DuckDNS. We will not set up a reverse proxy in this basic workshop.

Warning:
Opening ports on your router carries security risks. Ensure you use strong passwords for Emby and keep your system updated. This method exposes Emby directly to the internet over HTTP (unencrypted) unless you later configure HTTPS within Emby itself (port 8920) or use a reverse proxy.

Prerequisites

  • Emby Server running on your local network.
  • Knowledge of your Emby server's static local IP address (e.g., 192.168.1.100). Set up a DHCP reservation or static IP if you haven't already.
  • Access to your home router's administration interface and login credentials.
  • A way to test remote access (e.g., a smartphone using its cellular data connection, not connected to your home Wi-Fi).

Step 1 Identifying Server IP and Router Access

  1. Confirm Server IP: Double-check the local IP address of the machine running Emby (e.g., using ip a on Linux). Let's assume it's 192.168.1.100.
  2. Access Router: Log in to your router's web administration page (e.g., http://192.168.1.1).

Step 2 Configuring Port Forwarding on Your Router

  1. Locate Port Forwarding: Find the "Port Forwarding," "Virtual Server," or similar section in your router's interface.
  2. Create Rule for Emby: Create a new rule with these settings (exact field names may vary):
    • Service/Rule Name: Emby
    • External/WAN/Source Port: 8096
    • Internal/LAN/Destination Port: 8096
    • Internal/LAN/Destination IP Address: 192.168.1.100 (Use your server's actual static IP)
    • Protocol: TCP
    • Enable: Check the box to enable the rule.
  3. Save/Apply: Save the rule and apply the changes. Your router might restart.

Step 3 Setting Up a DDNS Service (DuckDNS Example)

  1. Create DuckDNS Account: Go to https://www.duckdns.org/. Log in using a Persona, Google, Github, Reddit, or Twitter account.
  2. Create Subdomain: In the DuckDNS dashboard, enter a desired subdomain name (e.g., my-awesome-emby) in the text box and click "add domain". If available, it will be created (e.g., my-awesome-emby.duckdns.org). Note down your full domain name.
  3. Note Your Token: Your unique DuckDNS token will be displayed at the top of the page. Keep this token secure and private.
  4. Set up Update Client (Docker Method): We'll run a Docker container to keep DuckDNS updated with your public IP. Create a new docker-compose.yml file (or add a service to an existing one) for the DuckDNS updater.

    • Create a directory: sudo mkdir -p /opt/duckdns
    • Create the compose file: sudo nano /opt/duckdns/docker-compose.yml
    • Paste the following, replacing YOUR_SUBDOMAINS and YOUR_TOKEN:
    version: "3.7"
    services:
      duckdns:
        image: linuxserver/duckdns:latest
        container_name: duckdns
        environment:
          - PUID=1000 # Your user PUID (optional, can often run as root if needed)
          - PGID=1000 # Your user PGID (optional)
          - TZ=Etc/UTC # Your Timezone
          - SUBDOMAINS=my-awesome-emby # Replace with your subdomain(s), comma-separated if multiple
          - TOKEN=YOUR_DUCKDNS_TOKEN_HERE # Replace with your token from DuckDNS website
          - LOG_FILE="true" # Optional: Log to file instead of docker console
        volumes:
          - /opt/duckdns/config:/config # Persistent storage for DuckDNS config
        restart: unless-stopped
    
    • Save the file (Ctrl+X, Y, Enter).
    • Start the container: cd /opt/duckdns && sudo docker-compose up -d
    • Check Logs: Verify it's working: sudo docker-compose logs -f. You should see messages indicating it checked your IP and updated DuckDNS successfully (or reported no change needed).

Step 4 Configuring Emby for Remote Access (Public URL)

While not strictly necessary for port forwarding to work, telling Emby its public address can help with certain features and client configurations.

  1. Log in to Emby as administrator.
  2. Go to Manage Server (⚙️) -> Settings -> Networking.
  3. Public HTTP port number: Should already be 8096.
  4. Public HTTPS port number: Should be 8920 (or 443 if using a reverse proxy later).
  5. External domain name or IP address: Enter your full DuckDNS hostname here (e.g., my-awesome-emby.duckdns.org).
  6. Secure connection mode: Leave as Handled by reverse proxy or Preferred for now. If you later enable HTTPS directly in Emby (port 8920), you might change this to Required.
  7. Allow remote connections to Emby server: Ensure this main toggle is checked.
  8. Save the settings.

Step 5 Testing Remote Access from an External Network

  1. Disconnect from Local Wi-Fi: Use a smartphone or laptop connected to a different network (e.g., phone's cellular data, a friend's house, public Wi-Fi - be cautious on public networks).
  2. Open Browser: Open a web browser on the remote device.
  3. Navigate to DDNS Hostname: Enter the address including the port number: http://your-duckdns-hostname.duckdns.org:8096 (e.g., http://my-awesome-emby.duckdns.org:8096)
  4. Check Connection:
    • Success: If you see the Emby login screen, your port forwarding and DDNS are working! You can try logging in with a user account that has remote access enabled (like "Bob" if you enabled it for him).
    • Failure: If the page doesn't load (timeout, connection refused), troubleshoot:
      • Check Public IP: Does the IP address listed for your hostname on the DuckDNS website match your current public IP address (you can find your public IP by searching "what is my IP" on Google from your home network)? If not, the DDNS updater isn't working correctly. Check its logs (sudo docker logs duckdns).
      • Check Port Forwarding Rule: Double-check the rule details in your router: correct internal IP, correct ports (8096), TCP protocol, rule enabled?
      • Check Firewall: Is there a firewall on the Emby server host machine (e.g., ufw on Ubuntu) blocking incoming connections on port 8096? If so, allow it: sudo ufw allow 8096/tcp.
      • Check ISP Blocking: Some ISPs block incoming connections on common ports. Port 8096 is usually okay, but it's a possibility. You could try mapping a different external port (e.g., 8097) to internal port 8096 in your router rule, then access via http://your-hostname:8097.
      • Test Port Externally: Use an online port checking tool (like canyouseeme.org or portchecker.co) from an external device. Enter your public IP (or DDNS hostname) and port 8096. It should report the port as "Open" or "Success". If it shows "Closed" or "Filtered", the issue lies with the router rule, firewall, or ISP.

Congratulations! If successful, you have configured basic remote access to your Emby server using port forwarding and DDNS. Remember the security implications and consider setting up a reverse proxy with HTTPS for better security and convenience later.

Advanced Level

This section explores sophisticated features of Emby, focusing on fine-grained user control, extending functionality with plugins, and essential server maintenance practices like backups and monitoring. These topics are aimed at users seeking maximum control, reliability, and customization from their Emby setup.

7. Advanced User Management and Permissions

Beyond basic user creation and library access, Emby offers more granular control over user privileges, content access, and features, particularly useful in complex households or when sharing access outside the immediate family.

Fine-Grained Access Control per Library

While basic user settings allow enabling/disabling access to all libraries, you often need more specific control.

  1. Disable Global Access: Go to Manage Server (⚙️) -> Users -> Select the user -> Access tab. Uncheck the box labeled "Allow access to all libraries". Save the user profile.
  2. Configure Library-Specific Access:
    • Navigate to Manage Server (⚙️) -> Library.
    • You will now see your libraries listed. Click the padlock icon (🔒) that appears next to each library name (this icon only appears if at least one user has "Allow access to all libraries" unchecked).
    • A dialog box appears listing all users who don't have global access.
    • Check the box next to each user who should have access to this specific library.
    • Click "OK".
  3. Repeat for Each Library: Repeat step 2 for every library, granting access only to the appropriate users.

Use Cases:

  • Kids Library: Create a "Kids Animation" library and only grant access to child user profiles.
  • 4K Library: Create a separate library for demanding 4K content and only grant access to users with compatible devices or local network access.
  • Personal Libraries: Allow each family member to have a "Home Videos" library only accessible to them (or selected others).

This provides precise control over who sees which content collections.

Creating User Groups and Profiles

Managing permissions individually for many users can become tedious. While Emby doesn't have explicit "Groups" in the same way as some systems, you can achieve similar results using User Profiles (sometimes referred to as Templates, depending on Emby version/context) or by carefully managing permissions on a base user and potentially duplicating users (less ideal).

Using User Profiles (Concept): Some Emby configurations or plugins might allow creating template profiles. You define a profile (e.g., "Child Profile," "Teen Profile," "Remote Guest Profile") with specific access rights, parental controls, home screen layouts, and playback restrictions. When creating a new user, you assign them to one of these profiles, inheriting its settings. This simplifies setup and ensures consistency. Check current Emby documentation or forums for the exact implementation, as this feature's specifics might evolve.

Manual Approach (Without Explicit Profiles):

  1. Create a base user for each "type" (e.g., _child_template, _guest_template).
  2. Configure all desired permissions, parental controls, and home screen settings on these template users.
  3. When creating a new actual user (e.g., Charlie), manually replicate the settings from the corresponding template (_child_template).
  4. While more manual, this enforces a consistent setup logic.

Using profiles or a template approach significantly streamlines administration for larger user bases.

Sync Feature Configuration (Emby Premiere)

The Sync feature allows users to download media from your Emby server to their client devices (phones, tablets, laptops) for offline playback. This requires an active Emby Premiere subscription. Administrators control who can use this feature and set quality profiles for synced content.

  1. Enable Sync Permission: Go to Manage Server (⚙️) -> Users -> Select the user -> Access tab. Ensure "Enable media downloading and syncing" is checked.
  2. Configure Sync Options (Server-Wide): Go to Manage Server (⚙️) -> Devices -> Settings (or Sync sub-section).
    • Sync quality profiles: Define default quality options available to users when they choose to sync content (e.g., "720p - 4 Mbps," "1080p - 8 Mbps," "Original Quality"). You can add, remove, or modify these profiles. Limiting options can help manage server load and storage space on client devices.
    • Concurrent Sync Operations: Limit how many sync jobs can run simultaneously on the server to prevent overwhelming resources.
  3. User Sync Management (Client-Side): Users initiate syncs from their Emby client apps. They select movies, episodes, or albums and choose a desired quality profile from the ones you configured. The client app downloads the content (potentially requiring Emby Server to transcode it first if the selected quality isn't the original format).
  4. Monitor Sync Jobs (Admin): Go to Manage Server (⚙️) -> Devices -> Sync. You can see active sync jobs, queued items, and potentially manage them. You can also see synced content per device under Devices -> Devices.

Carefully managing sync permissions and profiles helps control bandwidth usage and server load associated with offline media preparation.

Managing Devices and Sessions

Emby tracks every client app and browser session that connects to your server. Administrators can view and manage these connections.

  1. Access Devices: Go to Manage Server (⚙️) -> Devices -> Devices.
  2. View Connected Devices: This screen lists all devices that have ever connected to your server, grouped by user. You can see the device name, app version, last connection time, and IP address.
  3. Manage Individual Devices: Click on a specific device entry. You can:
    • Rename: Give the device a more recognizable name (e.g., "Living Room TV," "Alice's Phone").
    • Disable Access: Prevent this specific device from connecting to the server anymore, regardless of user credentials. Useful if a device is lost or stolen.
    • Manage Synced Content: View or delete media synced to this device.
    • Control Playback: Set device-specific playback capabilities (e.g., force a lower quality if you know the device struggles).
  4. Access Active Sessions: Go to the main Dashboard. The "Activity" section shows currently active streams and sessions. You can often click on a session to get more details or even stop the playback remotely. Logs also provide information about active and past sessions.

Managing devices and sessions allows you to monitor server usage, revoke access from specific endpoints, and troubleshoot playback issues related to particular clients.

Workshop Implementing Granular Access Control for Different User Types

This workshop demonstrates setting up fine-grained library access and parental controls for distinct user types: Admin (you), Adult (Bob), Teen (new user), and Child (Charlie).

Prerequisites

  • Emby Server running with Admin, Bob, and Charlie users created.
  • At least two libraries created:
    • "Movies" (containing a mix of ratings, e.g., G, PG, R)
    • "Kids TV Shows" (containing only G/TV-Y rated content - add some sample files if needed, organize them correctly, and create the library). Ensure library metadata settings include a country for ratings.
  • Emby Premiere is not required for this workshop.

Step 1 Defining User Roles and Desired Access

  • Admin: Full access to everything. (Already set up).
  • Bob (Adult): Access to "Movies" library, no access to "Kids TV Shows". No rating restrictions.
  • Trudy (Teen - New User): Access to "Movies" library but restricted up to PG-13 rating. No access to "Kids TV Shows".
  • Charlie (Child): Access only to "Kids TV Shows" library. Restricted to G rating. No access to "Movies".

Step 2 Creating the Teen User (Trudy)

  1. Go to Manage Server (⚙️) -> Users -> + New User.
  2. Username: Trudy
  3. Password: Set a password (e.g., trudypass).
  4. Profile Tab: Name: Trudy (Teen).
  5. Access Tab:
    • Check "Allow media playback".
    • Uncheck "Administrator".
    • Uncheck "Allow access to all libraries". (Crucial!)
    • Configure remote access/sync as desired (let's leave unchecked for now).
  6. Parental Control Tab:
    • Maximum Parental Rating: Select PG-13 (or the equivalent for your country's rating system).
    • Optionally check "Block items with no or unrecognized rating information" for stricter control.
  7. Click "Save".

Step 3 Configuring Library Access for Each User

  1. Go to Manage Server (⚙️) -> Library.
  2. Movies Library:
    • Click the padlock icon (🔒) next to the "Movies" library name.
    • In the dialog, check the boxes for Bob and Trudy.
    • Leave Charlie unchecked.
    • Click "OK".
  3. Kids TV Shows Library:
    • Click the padlock icon (🔒) next to the "Kids TV Shows" library name.
    • In the dialog, check the box for Charlie.
    • Leave Bob and Trudy unchecked.
    • Click "OK".

(Admin users always have access to all libraries, regardless of these settings).

Step 4 Refining Charlie's Permissions

Let's ensure Charlie's settings align perfectly with our plan.

  1. Go to Manage Server (⚙️) -> Users -> Select Charlie.
  2. Access Tab: Verify "Allow access to all libraries" is unchecked. (If you followed the previous workshop, Charlie might still have this checked; if so, uncheck it now and re-confirm library access via the padlock icons as in Step 3).
  3. Parental Control Tab: Verify "Maximum Parental Rating" is set to G (or equivalent).
  4. Click "Save".

Step 5 Testing Permissions with Different User Logins

  1. Log out as Admin.
  2. Test Bob:
    • Log in as Bob.
    • Check Libraries: Bob should see the "Movies" library but not the "Kids TV Shows" library.
    • Check Content: Within "Movies", Bob should see content of all ratings (G, PG, R, etc.).
    • Log out.
  3. Test Trudy:
    • Log in as Trudy.
    • Check Libraries: Trudy should see the "Movies" library but not the "Kids TV Shows" library.
    • Check Content: Within "Movies", Trudy should only see content rated PG-13 or lower (plus potentially unrated content if not blocked). R-rated movies should be hidden.
    • Log out.
  4. Test Charlie:
    • Log in as Charlie.
    • Check Libraries: Charlie should see the "Kids TV Shows" library but not the "Movies" library.
    • Check Content: Within "Kids TV Shows", Charlie should only see content matching the G rating (or equivalent) if ratings were fetched.
    • Log out.
  5. Test Admin:
    • Log in as Admin.
    • Admin should see both "Movies" and "Kids TV Shows" libraries and all content within them.

If the access and content visibility match the expected behavior for each user, you have successfully implemented fine-grained access control per library combined with user-specific parental controls. This setup provides a tailored and safe viewing experience for different members of your household.

8. Plugins and Integrations

Emby's core functionality can be significantly extended through the use of plugins. The official Emby plugin catalog offers a variety of additions, ranging from metadata downloaders and utility tools to integrations with external services like Trakt.tv and Live TV backends.

Exploring the Emby Plugin Catalog

The plugin catalog is the central repository for discovering and installing available plugins.

  1. Access Catalog: Log in as administrator, navigate to Manage Server (⚙️) -> Plugins -> Catalog.
  2. Browse Categories: Plugins are typically organized into categories like "Channels," "General," "Live TV," "Metadata," "Notifications," "Social," "Subtitles," "Themes," etc. Browsing by category helps find plugins related to specific functionalities.
  3. Search: Use the search bar if you're looking for a specific plugin by name (e.g., "Trakt," "Open Subtitles," "Backup").
  4. Plugin Details: Click on a plugin name to view its description, author, version history, and sometimes configuration instructions or links to further documentation (often on the Emby community forums).

Take some time to explore the catalog and see what kinds of extensions are available. Be mindful that installing too many plugins, especially poorly maintained or resource-intensive ones, could potentially impact server performance or stability. Stick to well-regarded plugins or those addressing specific needs you have.

Installing and Configuring Key Plugins

Here are some popular and useful plugins and the general process for installing and configuring them:

Installation Process:

  1. Find the desired plugin in the Catalog.
  2. Click on the plugin name.
  3. Click the "Install" button.
  4. Wait for the installation to complete.
  5. Restart Emby Server: Most plugins require a server restart to become active. Emby usually prompts you to restart. Click "Restart Now" or restart manually (e.g., sudo docker-compose restart emby).

Configuration Process (General):

  • After restarting, the installed plugin might appear as a new section under Manage Server (⚙️) -> Settings (e.g., "Open Subtitles," "Trakt").
  • Alternatively, some plugins add options within existing sections (e.g., a metadata plugin might add new fetchers under Library -> Metadata settings).
  • Some plugins run as background services and might only have minimal configuration options directly under the Plugins -> My Plugins section (click the plugin name or a settings icon if available).

Key Plugin Examples:

Trakt.tv Scrobbling

  • Purpose: Integrates Emby with Trakt.tv, a popular service for tracking watched movies and TV shows. Automatically syncs watch history, ratings, and collection status between Emby and Trakt.
  • Installation: Install the "Trakt" plugin from the catalog and restart Emby.
  • Configuration:
    1. Go to Manage Server (⚙️) -> Settings -> Trakt.
    2. You'll need a Trakt.tv account. Follow the instructions in the plugin settings to authorize it to access your Trakt account (usually involves clicking a link, getting a PIN from Trakt, and entering it back into Emby).
    3. Configure plugin options:
      • Select which Emby users should have their watch data synced to which Trakt account (you can link multiple Emby users to the same or different Trakt accounts).
      • Choose what to sync (Playback, Collection, Ratings).
      • Set sync frequency or trigger conditions.
    4. Save the settings.

Subtitle Downloaders (OpenSubtitles)

  • Purpose: Automatically search for and download subtitles for your movies and TV shows from online sources like OpenSubtitles.org.
  • Installation: Install the "Open Subtitles" plugin and restart Emby. (Other subtitle plugins might exist).
  • Configuration:
    1. Go to Manage Server (⚙️) -> Settings -> Open Subtitles.
    2. Enter your OpenSubtitles.org username and password (a free account is required).
    3. Configure preferred subtitle languages (e.g., eng for English, spa for Spanish). Add multiple languages in order of preference.
    4. Set options like "Download subtitles for episodes with existing subtitles" or "Download hearing impaired subtitles."
    5. Save settings.
    6. Enable in Libraries: Go to Manage Server (⚙️) -> Library. Edit each Movie and TV Show library. Scroll down to the "Subtitle downloaders" section and ensure "Open Subtitles" (or your chosen plugin) is checked. Save the library settings.
    7. Trigger Download: Subtitle downloads usually occur during scheduled library scans or can be triggered manually via the "Refresh Metadata" task (with subtitle download options selected) or sometimes directly from the media item's edit screen.

IPTV/Live TV Integration (M3U, HDHomeRun)

  • Purpose: Allows Emby to stream Live TV channels from sources like HDHomeRun network tuners or IPTV providers (using M3U playlist URLs and XMLTV guide data URLs). Full DVR (recording) functionality requires Emby Premiere.
  • Installation: Core Live TV functionality is often built-in, but specific tuner support or features might involve plugins. The core setup is under Manage Server (⚙️) -> Live TV.
  • Configuration:
    1. Go to Manage Server (⚙️) -> Live TV.
    2. Click "+ Add Tuner Device" or "+ Add TV Source".
    3. HDHomeRun: Emby often auto-discovers HDHomeRun devices on the network. Select your device.
    4. IPTV (M3U): Select "M3U Tuner". Enter the URL for your M3U playlist file (provided by your IPTV source).
    5. Guide Data: Click "+ Add TV Guide Data Provider". Select "XMLTV". Enter the URL for your XMLTV guide data file. Configure refresh times. Map channels from the M3U source to the guide data.
    6. Configure tuner counts, channel mapping, DVR settings (if using Premiere).
    7. Save settings. Live TV should then appear as an option in Emby clients.

Utility Plugins (Log Manager, Backup)

  • Purpose: Provide administrative tools for server maintenance.
    • Log Manager: May offer easier ways to view, filter, or rotate server logs than the built-in log viewer.
    • Backup & Restore: Official or third-party plugins might offer dedicated interfaces for backing up and restoring Emby's configuration database and critical data folders. (Example: Server Configuration Backup).
  • Installation: Find relevant plugins in the catalog (e.g., search "Backup"). Install and restart.
  • Configuration: Access the plugin's settings (usually under Settings or as a top-level item in the dashboard menu). Configure backup paths, schedules, retention policies, etc., according to the plugin's documentation.

Plugin Management and Updates

  • Viewing Installed Plugins: Go to Manage Server (⚙️) -> Plugins -> My Plugins. This lists all currently installed plugins. You can disable, uninstall, or sometimes access configuration options from here.
  • Updating Plugins: Emby periodically checks for updates to installed plugins. When updates are available, you'll usually see a notification on the dashboard or in the Plugins section. Navigate to Plugins -> Updates (if available) or check the Catalog for newer versions of your installed plugins. Click "Update" on the desired plugins and restart Emby server when prompted. Keeping plugins updated is important for security, stability, and compatibility with new Emby Server versions.

Workshop Integrating Trakt.tv for Watch History Syncing

This workshop guides you through installing and configuring the official Trakt plugin to automatically sync watch progress and history between your Emby server and your Trakt.tv account.

Prerequisites

  • Emby Server running and accessible.
  • Logged in as the administrator.
  • An active Trakt.tv account (sign up for free at https://trakt.tv/).
  • At least one regular Emby user (e.g., Bob) whose watch history you want to sync.

Step 1 Creating a Trakt.tv Account

If you don't already have one, go to https://trakt.tv/join and create a free account. Familiarize yourself briefly with the Trakt website interface if you're new to it.

Step 2 Installing the Trakt Plugin in Emby

  1. In the Emby Web UI, log in as administrator.
  2. Go to Manage Server (⚙️) -> Plugins.
  3. Click on the "Catalog" tab.
  4. In the search bar, type Trakt or find it under the "Social" or "General" category.
  5. Click on the "Trakt" plugin details.
  6. Click the "Install" button. Wait for installation to complete.
  7. Emby will prompt you to restart the server. Click "Restart Now".

Step 3 Configuring the Trakt Plugin (API Keys/Authentication)

  1. Wait for Emby server to restart and log back in as administrator.
  2. Go to Manage Server (⚙️) -> Settings. You should now see "Trakt" listed in the settings menu (you might need to scroll down). Click on "Trakt".
  3. Authorize Plugin: The plugin needs permission to access your Trakt account.
    • Click the button or link provided in the plugin settings, often labeled "Click here to authenticate your Trakt account" or similar.
    • This will likely redirect you to the Trakt.tv website, asking you to confirm that you want to allow the "Emby Server Trakt Plugin" (or similar name) to access your account. Click "Yes" or "Allow".
    • Trakt will display an 8-digit PIN code. Copy this code.
    • Go back to the Emby Trakt plugin settings page. Paste the PIN code into the designated field.
    • Click "Authenticate" or "Save". The plugin should confirm successful authentication.
  4. Link Emby Users to Trakt: Now, you need to specify which Emby user(s) should sync with the authenticated Trakt account.
    • Scroll down to the "Trakt Users" section.
    • You will see a list of your Emby users (e.g., Admin, Bob, Charlie, Trudy).
    • Check the box next to the Emby user(s) whose watch history you want to sync to the currently linked Trakt account. Let's check the box for Bob. (You can typically only link one Trakt account at a time via the main authentication, but some setups might allow per-user authentication links - check plugin docs if needed).
    • (Optional: If you wanted different Emby users to sync to different Trakt accounts, the process might be more complex, potentially requiring those users to authenticate individually if the plugin supports it, or using different browser profiles/incognito mode during authentication). For this workshop, we'll sync Bob to your main Trakt account.

Step 4 Setting Plugin Options (Sync behavior)

Review the other options available in the Trakt plugin settings:

  • Sync Options:
    • Scrobble: Check this to report watch progress to Trakt in near real-time.
    • Sync Collection: Check this to add/remove media in your Trakt collection based on your Emby library contents.
    • Sync Watched Status: Check this to sync the watched/unwatched status of items between Emby and Trakt (bi-directionally if supported, or one-way).
    • Sync Ratings: Check this to sync ratings given in Emby to Trakt, and potentially vice-versa.
  • Data Sync: Configure whether to sync Movies, Episodes, or both.
  • Skip Filter: Define rules to skip syncing for certain users, libraries, or content types if needed.
  • Run sync job after library scan: Recommended. Automatically triggers a full sync after Emby scans libraries for changes.
  • Sync Interval: Set how often the plugin performs a background sync (e.g., every 6 hours).

Ensure the essential options like "Scrobble" and "Sync Watched Status" are enabled for Movies and Episodes. Configure the others based on your preference. Save the settings.

Step 5 Testing Scrobbling and Sync

  1. Log out as Admin and log in as the user you linked to Trakt (e.g., Bob).
  2. Play Media: Find a movie or TV episode in Bob's Emby view that you haven't watched before (or mark it as unwatched in Emby first). Start playing it.
  3. Check Trakt (Scrobbling): While the media is playing in Emby (play at least a few minutes), open your Trakt.tv dashboard or profile page in a separate browser tab. You should see an indication that you are currently watching ("scrobbling") that specific movie or episode via Emby.
  4. Mark as Watched: Let the episode/movie play past the Trakt scrobble threshold (usually around 80-90% completion) or finish it. Alternatively, manually mark the item as "Watched" within Emby.
  5. Check Trakt (History): Wait a few moments (sync might not be instantaneous). Refresh your Trakt.tv history page (https://trakt.tv/users/me/history). The item you just watched/marked should appear in your Trakt history, indicating it was successfully synced from Emby.
  6. Test Other Way (Optional): Mark an item as watched directly on the Trakt.tv website. Wait for the next scheduled sync in Emby (or trigger a manual sync via Scheduled Tasks -> Trakt Sync if available). Check if the item's watched status updates correctly within Emby for user Bob.

If scrobbling works in real-time and watched history appears correctly on Trakt after watching in Emby, you have successfully integrated Trakt.tv with your Emby server! This keeps your viewing history synchronized across platforms.

9. Server Maintenance, Backup, and Monitoring

Running a self-hosted server like Emby requires ongoing attention to ensure stability, performance, and data safety. Regular maintenance, a solid backup strategy, and effective monitoring are crucial for a reliable media experience.

Scheduled Tasks (Library Scans, Metadata Updates)

Emby includes a built-in task scheduler to automate routine maintenance.

  1. Access Scheduled Tasks: Go to Manage Server (⚙️) -> Scheduled Tasks.
  2. Review Default Tasks: You'll see a list of default tasks, including:
    • Scan Media Library: Scans your library folders for new or changed media files. Essential for keeping your library up-to-date. You can configure the schedule (e.g., daily, every few hours). You can also trigger scans manually from here or the Library settings.
    • Update Plugins: Checks for available plugin updates.
    • Refresh People: Periodically refreshes metadata for actors/directors.
    • Download Metadata and Images: Updates existing metadata and fetches missing information.
    • Chapter Image Extraction: Generates thumbnail images from video chapters (can be resource-intensive).
    • Database Cleanup: Optimizes and cleans up the Emby database.
    • Trakt Sync: (If Trakt plugin installed) Performs synchronization with Trakt.tv.
  3. Configure Schedules: Click on a task name to view its details and configure its schedule. You can set it to run daily, weekly, monthly, or at specific intervals. Adjust schedules based on how frequently your library changes and your server's resources. Avoid scheduling too many resource-intensive tasks (like library scans and chapter extraction) to run simultaneously, especially on lower-powered hardware.
  4. Run Manually: You can trigger any task to run immediately by clicking the "Play" icon (▶️) next to it.

Regularly running tasks like library scans and metadata updates ensures your Emby experience remains current and accurate.

Database Maintenance and Optimization

Emby stores all its metadata, user information, watch states, and settings in internal databases (typically SQLite files located within the /config/data directory). Over time, these databases can grow and potentially become fragmented or suffer minor inconsistencies.

  • Database Cleanup Task: The built-in "Database Cleanup" scheduled task performs basic optimization (like SQLite VACUUM command) to reclaim unused space and potentially improve performance. Ensure this task runs periodically (e.g., weekly).
  • Manual Checks (Advanced): In rare cases of database corruption or severe performance issues, advanced users might manually inspect or repair the SQLite database files (library.db, users.db, etc.) using external SQLite tools. This should only be done with extreme caution and after backing up the database files, as incorrect modifications can lead to data loss. Always stop the Emby server before attempting manual database operations.

Backup Strategies for Emby Data

Your Emby configuration and metadata represent a significant investment of time (organizing, curating, fixing matches). Losing this data can be frustrating. Regular backups are essential.

Identifying Critical Data Directories

The most crucial data to back up is typically located within the main configuration directory you mapped during installation. If using Docker with the path /opt/emby/config mapped to /config inside the container (as per our workshop), you need to back up the contents of /opt/emby/config on your host system.

Key subdirectories within the configuration folder usually include:

  • config/: Contains core XML configuration files.
  • data/: Contains the primary databases (library.db, users.db, etc.) and potentially playback reporting data.
  • metadata/: Contains downloaded images (posters, backdrops, etc.) unless you configured Emby to store images alongside media files. This can be large but is often re-downloadable.
  • plugins/: Contains installed plugins and their configurations.
  • cache/: Temporary cache files, usually less critical to back up but might contain useful cached metadata.
  • logs/: Log files, generally not critical for restore but useful for troubleshooting.

The absolute minimum critical backup targets are the config/ and data/ directories. Backing up metadata/ and plugins/ is highly recommended to avoid lengthy re-downloading and reconfiguration.

Manual Backup Procedures

  1. Stop Emby Server: It's safest to stop the Emby server process or container before backing up, especially the database files, to ensure data consistency.
    • Docker Compose: sudo docker-compose stop emby (from the directory with docker-compose.yml)
    • Native Service: sudo systemctl stop emby-server (or similar)
  2. Copy Data: Use standard file copying tools (cp, rsync, Windows File Explorer) to copy the critical directories (e.g., /opt/emby/config) to a separate backup location (e.g., a different hard drive, USB drive, network share).
    # Example using rsync (preserves permissions, efficient)
    # Ensure destination directory exists: mkdir -p /path/to/backup/emby/
    sudo rsync -avh /opt/emby/config/ /path/to/backup/emby/config_backup_YYYYMMDD/
    
  3. Restart Emby Server: Start Emby again after the backup completes.
    • Docker Compose: sudo docker-compose start emby
    • Native Service: sudo systemctl start emby-server

Automated Backup Scripts/Tools (e.g., using rsync, Duplicati)

Manual backups are prone to being forgotten. Automation is key.

  • Using rsync and cron (Linux):
    • Create a simple shell script that stops Emby, performs the rsync backup, and restarts Emby.
    • Schedule this script to run automatically at regular intervals (e.g., nightly, weekly) using cron.
  • Dedicated Backup Software: Tools like Duplicati, BorgBackup, Restic, or even commercial cloud backup solutions can be configured to back up the Emby configuration directory automatically. These tools often offer features like:
    • Scheduling: Built-in scheduling.
    • Versioning: Keep multiple historical versions of your backup.
    • Deduplication: Save storage space by only backing up changed blocks of data.
    • Encryption: Encrypt backups for security, especially if storing offsite or in the cloud.
    • Offsite Backups (3-2-1 Rule): Configure backups to be sent to a remote location (another computer, NAS, cloud storage like Backblaze B2, S3) for disaster recovery. Follow the 3-2-1 backup rule: 3 copies of your data, on 2 different media types, with 1 copy offsite.

Restoring from Backup:

  1. Stop Emby Server.
  2. Rename or remove the current (corrupted/failed) configuration directory (e.g., /opt/emby/config).
  3. Copy the backed-up configuration directory back to its original location. Ensure permissions are correct.
  4. Start Emby Server.

Monitoring Server Performance

Keeping an eye on your server's health helps anticipate problems and optimize performance.

Using Emby Dashboard Activity Logs

  • Dashboard: The main Emby dashboard shows real-time activity: active streams (Direct Play/Transcode status, user, device, bandwidth), running scheduled tasks, and recently added media. This is your first stop for checking current usage.
  • Logs: Manage Server (⚙️) -> Logs. Review embyserver.txt for general server activity, startup information, and errors. Check ffmpeg-transcode-*.txt logs to diagnose transcoding issues. Regularly check for recurring errors or warnings.

System-Level Monitoring (htop, Docker stats, Prometheus/Grafana)

Monitor the underlying host system's resources:

  • htop / top (Linux): Interactive command-line tools to view real-time CPU usage per process, memory usage, load average, and running tasks. Excellent for identifying which processes (like ffmpeg during transcoding) are consuming resources.
  • docker stats (Docker): If using Docker, run sudo docker stats to see real-time CPU, memory, network I/O, and block I/O usage for all running containers, including Emby.
  • Advanced Monitoring Stacks (Prometheus/Grafana): For comprehensive, long-term monitoring and visualization, consider setting up Prometheus (time-series database for metrics) and Grafana (dashboarding tool). You can use exporters like cadvisor (for Docker container metrics) and node-exporter (for host system metrics) to feed data into Prometheus, then build Grafana dashboards to track CPU, RAM, disk I/O, network traffic, container health, etc., over time. This provides deeper insights into performance trends and potential bottlenecks.

Troubleshooting Common Issues

Log File Analysis

Logs are your best friend when things go wrong.

  • Identify the Time: Note when the issue occurred.
  • Check Relevant Logs: Look at embyserver.txt around the time of the issue for general errors. If it was a playback problem, check the corresponding ffmpeg-transcode-*.txt log.
  • Look for Keywords: Search for terms like Error, Fail, Warn, Exception, Crash.
  • Context Matters: Read the lines before and after the error message to understand the sequence of events.
  • Verbose Logging (Temporary): If needed, you can sometimes enable more detailed debug logging within Emby settings (often under Settings -> Logs), but remember to disable it afterward as it can generate large log files.

Playback Problems (Buffering, Errors)

  • Check Dashboard: Is it Direct Play, Direct Stream, or Transcoding?
  • Transcoding Issues:
    • High CPU Usage? Check htop/docker stats. Server might be underpowered. Is Hardware Acceleration enabled and working?
    • Slow Transcode Speed? Check ffmpeg log for speed (speed=...x). If less than 1.0x, transcoding can't keep up. Check CPU/GPU usage, transcode temp path speed (use SSD).
    • Errors in ffmpeg log? Look for codec errors, decoding failures. Media file might be corrupted.
  • Network Bottleneck:
    • Buffering on local network? Check Wi-Fi signal strength or switch server/client to wired Ethernet. Check network cables. Run iperf3 test between client and server to measure bandwidth.
    • Buffering on remote network? Check server's upload speed and client's download speed. Lower the streaming quality setting in the client app. Check for packet loss or high latency.
  • Client Issue: Try playback on a different client device or browser. Is the client app updated? Does the client natively support the media codecs?

Metadata Issues

  • Incorrect Match: Use the "Identify" feature on the media item (three-dot menu -> Identify) to manually search for the correct movie/show on TMDb/TVDB.
  • Missing Metadata/Images: Check file/folder naming conventions. Ensure metadata providers (TMDb, TVDB, etc.) are enabled and ordered correctly (Library settings). Perform a "Refresh Metadata" on the item or library (choose refresh mode carefully). Check server logs for errors connecting to metadata providers.
  • Naming Tools: Use tools like FileBot, Sonarr, Radarr for automated renaming according to recommended conventions before Emby scans them.

Connectivity Problems

  • Local Access Failure: Is Emby server running (sudo docker ps, sudo systemctl status emby-server)? Can you ping the server's IP address? Is a host firewall blocking port 8096? Check Emby logs for startup errors.
  • Remote Access Failure: See troubleshooting steps in Workshop 6 (Check DDNS, port forwarding, firewall, ISP blocks). If using a reverse proxy, check its logs and configuration. Ensure user has remote access permission enabled.

By proactively monitoring, maintaining, and backing up your Emby server, and knowing how to approach troubleshooting using logs and diagnostic tools, you can ensure a stable and enjoyable self-hosted media experience.

Workshop Automating Emby Configuration Backup using Rsync (Linux Example)

This workshop demonstrates how to create a simple automated backup solution for your Emby configuration data using rsync and cron on a Linux host running Emby in Docker.

Prerequisites

  • Emby Server running in Docker on Linux (e.g., using Docker Compose as per previous workshops).
  • Knowing the host path to your Emby configuration volume (e.g., /opt/emby/config).
  • A separate location on your host system (or preferably a different physical drive or network share) to store backups. Ensure this location has sufficient free space. Let's use /mnt/backups/emby for this workshop.
  • rsync installed on the host system (sudo apt install rsync or sudo dnf install rsync).
  • Root or sudo privileges.

Step 1 Identifying Emby Configuration Directory

Confirm the host path containing your persistent Emby configuration. Based on our previous workshops, this is likely /opt/emby/config.

Step 2 Creating a Backup Destination Directory

Create the directory where backups will be stored. It's good practice to include a date in the backup folder name. We'll handle the date dynamically in the script. First, create the base backup directory.

sudo mkdir -p /mnt/backups/emby
# Optional: Set permissions if needed, e.g., only root access
sudo chmod 700 /mnt/backups/emby
(Adjust /mnt/backups/emby to your chosen backup location).

Step 3 Writing a Basic Rsync Backup Script

We'll create a shell script that stops Emby, performs the backup using rsync, and then restarts Emby.

  1. Create Script File:

    sudo mkdir -p /opt/emby/scripts
    sudo nano /opt/emby/scripts/backup_emby.sh
    

  2. Paste Script Content:

    #!/bin/bash
    
    # --- Configuration ---
    EMBY_COMPOSE_DIR="/opt/emby" # Directory containing docker-compose.yml
    EMBY_CONFIG_SOURCE="/opt/emby/config/" # Source config directory (note trailing slash)
    BACKUP_BASE_DEST="/mnt/backups/emby" # Base backup destination directory
    TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
    BACKUP_DEST="${BACKUP_BASE_DEST}/config_backup_${TIMESTAMP}"
    LOG_FILE="/var/log/emby_backup.log"
    # Optional: Number of old backups to keep (set to 0 to keep all)
    KEEP_BACKUPS=7
    
    # --- Functions ---
    log_message() {
        echo "$(date +"%Y-%m-%d %H:%M:%S") - $1" | sudo tee -a ${LOG_FILE}
    }
    
    # --- Main Script ---
    log_message "Starting Emby backup process..."
    
    # Check if source directory exists
    if [ ! -d "${EMBY_CONFIG_SOURCE}" ]; then
        log_message "ERROR: Source directory ${EMBY_CONFIG_SOURCE} not found."
        exit 1
    fi
    
    # Create base backup destination if it doesn't exist
    sudo mkdir -p ${BACKUP_BASE_DEST}
    if [ ! -d "${BACKUP_BASE_DEST}" ]; then
        log_message "ERROR: Could not create base backup directory ${BACKUP_BASE_DEST}."
        exit 1
    fi
    sudo touch ${LOG_FILE} # Ensure log file exists and has correct permissions initially
    sudo chown root:root ${LOG_FILE} # Or appropriate user/group
    sudo chmod 600 ${LOG_FILE}
    
    # Stop Emby Container
    log_message "Stopping Emby container..."
    cd ${EMBY_COMPOSE_DIR} || { log_message "ERROR: Could not change to Emby compose directory ${EMBY_COMPOSE_DIR}."; exit 1; }
    sudo docker-compose stop emby
    if [ $? -ne 0 ]; then
        log_message "WARNING: Failed to stop Emby container gracefully. Proceeding with backup anyway."
        # Consider adding a 'docker kill emby' here if stop fails consistently, but use cautiously.
    else
        log_message "Emby container stopped successfully."
        sleep 5 # Brief pause to ensure services fully stopped
    fi
    
    
    # Perform Backup using rsync
    log_message "Running rsync backup from ${EMBY_CONFIG_SOURCE} to ${BACKUP_DEST}..."
    sudo mkdir -p ${BACKUP_DEST}
    sudo rsync -avh --delete "${EMBY_CONFIG_SOURCE}" "${BACKUP_DEST}/"
    RSYNC_EXIT_CODE=$?
    
    if [ ${RSYNC_EXIT_CODE} -eq 0 ]; then
        log_message "rsync backup completed successfully."
    else
        log_message "ERROR: rsync backup failed with exit code ${RSYNC_EXIT_CODE}. Check rsync output/errors."
        # Optionally add restart step here anyway or exit based on severity
    fi
    
    # Restart Emby Container
    log_message "Starting Emby container..."
    sudo docker-compose start emby
    if [ $? -ne 0 ]; then
        log_message "ERROR: Failed to start Emby container."
        exit 1 # Critical failure
    else
         log_message "Emby container started successfully."
    fi
    
    # Prune old backups (Optional)
    if [ ${KEEP_BACKUPS} -gt 0 ] && [ ${RSYNC_EXIT_CODE} -eq 0 ]; then
        log_message "Pruning old backups, keeping the latest ${KEEP_BACKUPS}..."
        cd ${BACKUP_BASE_DEST} || exit 1
        ls -dt config_backup_* | tail -n +$((KEEP_BACKUPS + 1)) | sudo xargs rm -rf
        log_message "Old backup pruning complete."
    fi
    
    log_message "Emby backup process finished."
    exit 0
    
  3. Make Script Executable:

    sudo chmod +x /opt/emby/scripts/backup_emby.sh
    

Script Explanation:

  • Sets variables for directories, timestamp, log file, and retention count.
  • Logs messages with timestamps to /var/log/emby_backup.log.
  • Stops the Emby container using docker-compose stop. Includes basic error checking.
  • Uses rsync -avh --delete to efficiently copy the config directory.
    • -a: Archive mode (preserves permissions, ownership, timestamps, etc.).
    • -v: Verbose output (optional, useful for logging).
    • -h: Human-readable numbers.
    • --delete: Deletes files in the destination that no longer exist in the source (keeps backup synchronized). Use with caution if modifying this script.
  • Restarts the Emby container using docker-compose start.
  • (Optional) Prunes old backups, keeping only the most recent KEEP_BACKUPS number of folders. It lists directories by time (ls -dt), skips the newest ones (tail -n +...), and removes the rest (sudo xargs rm -rf).

Step 4 Setting up a Cron Job for Automation

We'll use cron, the standard Linux task scheduler, to run this script automatically (e.g., daily at 3:00 AM).

  1. Edit Root Crontab: It's best to run this as root since we're stopping/starting Docker containers and accessing potentially restricted directories.

    sudo crontab -e
    
    (Select an editor like nano if prompted).

  2. Add Cron Job Line: Add the following line at the bottom of the file:

    # Run Emby backup script daily at 3:00 AM
    0 3 * * * /opt/emby/scripts/backup_emby.sh
    
    • 0 3 * * *: This specifies the schedule (Minute Hour DayOfMonth Month DayOfWeek). 0 3 * * * means 0 minutes past the 3rd hour, every day, every month, every day of the week. Adjust the time as needed.
    • /opt/emby/scripts/backup_emby.sh: The full path to your backup script.
  3. Save and Close: Save the crontab file (Ctrl+X, Y, Enter in nano). Cron will automatically pick up the schedule.

  1. Manual Test Run: Execute the script manually to ensure it works without errors:

    sudo /opt/emby/scripts/backup_emby.sh
    
    Check the output in the terminal and the contents of /var/log/emby_backup.log. Verify that a new backup folder (e.g., config_backup_20231027_103000) is created in /mnt/backups/emby containing your Emby configuration files. Check that Emby stops and restarts correctly.

  2. Test Restore (Simulated):

    • Stop Emby: sudo docker-compose -f /opt/emby/docker-compose.yml stop emby
    • Simulate Failure: Rename the live config directory: sudo mv /opt/emby/config /opt/emby/config.BROKEN
    • Restore from Backup: Copy the contents of your latest backup folder back to the original location:
      # Replace 'config_backup_YYYYMMDD_HHMMSS' with your actual latest backup folder name
      sudo mkdir /opt/emby/config
      sudo rsync -ah /mnt/backups/emby/config_backup_YYYYMMDD_HHMMSS/ /opt/emby/config/
      # Ensure ownership/permissions are correct (rsync -a should preserve them, but double check)
      # You might need: sudo chown -R 1000:1000 /opt/emby/config (replace with your PUID/PGID)
      
    • Start Emby: sudo docker-compose -f /opt/emby/docker-compose.yml start emby
    • Verify: Access Emby. Your settings, users, libraries, and watched status should be restored to the state they were in when the backup was taken.
    • Cleanup: Once verified, you can remove the .BROKEN directory: sudo rm -rf /opt/emby/config.BROKEN

You now have an automated backup system for your critical Emby configuration data using rsync and cron. Remember to periodically check that backups are running successfully (check the log file and backup directory contents) and test your restore procedure occasionally to ensure it works. Consider copying your backups to an offsite location for added safety.

Conclusion

Recap of Emby Features and Benefits

Throughout this guide, we've explored the multifaceted capabilities of Emby Media Server. We started with the fundamentals, understanding that Emby provides a centralized, self-hosted platform to organize, stream, and enjoy your personal media collections—movies, TV shows, music, photos, and more—across a wide array of devices.

Key benefits highlighted include:

  • Complete Control & Privacy: Owning your data and viewing habits.
  • Customization: Tailoring appearance, metadata, and user access.
  • Consolidation: Unifying disparate media into one interface.
  • Cost-Effectiveness: Free core functionality, with optional Premiere for advanced features.
  • Extensibility: A rich plugin ecosystem to add features like Trakt sync, subtitle downloading, and Live TV.
  • Learning Opportunity: Gaining practical experience in server management, networking, and media handling.

We progressed through basic installation (focusing on the flexible Docker method), organizing media libraries with proper naming conventions, and managing user accounts with parental controls. The intermediate section delved into customizing the look and feel, demystifying the critical concepts of Direct Play vs. Transcoding, understanding codecs, configuring hardware acceleration (like Intel QSV) for optimal performance, and setting up remote access using port forwarding, DDNS, and the more secure reverse proxy approach. Finally, the advanced section covered fine-grained user permissions, leveraging the power of plugins, and establishing crucial server maintenance routines including automated backups and performance monitoring.

Next Steps and Further Exploration

Your journey with Emby doesn't end here. Consider these next steps:

  • Explore Emby Premiere: If features like hardware transcoding (unlocked), offline sync, DVR, or advanced customization (Branding) appeal to you, evaluate Emby Premiere.
  • Refine Media Organization: Use tools like Sonarr (for TV shows), Radarr (for movies), and Lidarr (for music) to automate the downloading, sorting, and renaming of your media files according to best practices.
  • Implement a Reverse Proxy: For enhanced security (HTTPS) and cleaner remote access URLs, set up Nginx Proxy Manager, Traefik, or Caddy.
  • Dive Deeper into Plugins: Explore plugins for notifications (Gotify, Pushbullet), home automation integration (Home Assistant), or specific content channels.
  • Optimize Storage: Investigate storage solutions like NAS devices, RAID configurations for data redundancy, or ZFS for advanced data integrity features.
  • Contribute to the Community: Share your experiences, ask questions, and help others on the official Emby Community forums.

Community Resources

The self-hosting and Emby communities are vibrant and helpful resources.

  • Official Emby Community Forums: https://emby.media/community/ - The primary place for support, discussions, plugin development, themes, and announcements.
  • Emby Documentation: https://docs.emby.media/ - Official guides and knowledge base articles.
  • Reddit: Subreddits like r/emby, r/selfhosted, r/homelab, r/docker often have relevant discussions and user experiences.
  • LinuxServer.io: https://www.linuxserver.io/ - If using their Docker images, their website and Discord server are valuable resources.

Self-hosting Emby is a rewarding endeavor that puts you in control of your media experience. By applying the knowledge gained from this guide and continuing to explore, you can build a robust, personalized, and reliable media server tailored precisely to your needs. Happy streaming!