Skip to content

Emby

Skip the setup and get Emby "ElfHosted"! πŸ₯³

Want to skip the self-assembly, and have Emby INSTANTLY "Just Workβ„’"?

ElfHosted is an open-source app hosting platform (geek-cookbook-as-a-service), crafted with love by @funkypenguin - get your ElfHosted 🧝 instance of Emby now!

Emby (think "M.B." or "Media Browser") is best described as "like Plex but different" 😁 - It's a bit geekier and less polished than Plex, but it allows for more flexibility and customization.

Emby Screenshot

I've started experimenting with Emby as an alternative to Plex, because of the advanced parental controls it offers. Based on my experimentation thus far, I have a "kid-safe" profile which automatically logs in, and only displays kid-safe content, based on ratings.

Emby Requirements

Ingredients

Already deployed:

Related:

Preparation

Setup data locations

We'll need a location to store Emby's library data, config files, logs and temporary transcoding space, so create /var/data/emby, and make sure it's owned by the user and group who also own your media data.

mkdir /var/data/emby

Prepare Emby environment

Create emby.env, and populate with PUID/GUID for the user who owns the /var/data/emby directory (above) and your actual media content (in this example, the media content is at /srv/data)

PUID=
GUID=

Emby Docker Swarm config

Create a docker swarm config file in docker-compose syntax (v3), something like the example below:

Fast-track with premix! πŸš€

"Premix" is a git repository which includes necessary docker-compose and env files for all published recipes. This means that you can launch any recipe with just a git pull and a docker stack deploy πŸ‘.

πŸš€ Update: Premix now includes an ansible playbook, enabling you to deploy an entire stack + recipes, with a single ansible command! (more here)

version: "3.0"

services:
  emby:
    image: emby/emby-server
    env_file: /var/data/config/emby/emby.env
    volumes:
      - /var/data/emby/emby:/config
      - /srv/data/:/data
    deploy:
      labels:
        # traefik common
        - traefik.enable=true
        - traefik.docker.network=traefik_public

        # traefikv1
        - traefik.frontend.rule=Host:emby.example.com
        - traefik.port=8096     

        # traefikv2
        - "traefik.http.routers.emby.rule=Host(`emby.example.com`)"
        - "traefik.http.services.emby.loadbalancer.server.port=8096"
        - "traefik.enable=true"
    networks:
        - traefik_public
    ports:
      - 8096:8096

networks:
  traefik_public:
    external: true

Note

Setup unique static subnets for every stack you deploy. This avoids IP/gateway conflicts which can otherwise occur when you're creating/removing stacks a lot. See my list here.

Serving

Launch Emby stack

Launch the stack by running docker stack deploy emby -c <path -to-docker-compose.yml>

Log into your new instance at https://YOUR-FQDN, and complete the wizard-based setup to complete deploying your Emby.

Chef's notes πŸ““


  1. I didn't use an oauth2_proxy for this stack, because it would interfere with mobile client support. ↩

  2. Got an NVIDIA GPU? See this blog post re how to use your GPU to transcode your media! ↩

  3. We don't bother exposing the HTTPS port for Emby, since Traefik is doing the SSL termination for us already. ↩

Tip your waiter (sponsor) πŸ‘

Did you receive excellent service? Want to compliment the chef? (..and support development of current and future recipes!) Sponsor me on Github / Ko-Fi / Patreon, or see the contribute page for more (free or paid) ways to say thank you! πŸ‘

Employ your chef (engage) 🀝

Is this too much of a geeky PITA? Do you just want results, stat? I do this for a living - I'm a full-time Kubernetes contractor, providing consulting and engineering expertise to businesses needing short-term, short-notice support in the cloud-native space, including AWS/Azure/GKE, Kubernetes, CI/CD and automation.

Learn more about working with me here.

Flirt with waiter (subscribe) πŸ’Œ

Want to know now when this recipe gets updated, or when future recipes are added? Subscribe to the RSS feed, or leave your email address below, and we'll keep you updated.

Your comments? πŸ’¬