Get your FREE "elfhosted" Emby instance for demo / trial
Want to see a live demo, or "kick the tyres" before you commit to self-hosting Emby?
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.
- Docker swarm cluster with persistent shared storage
- Traefik configured per design
- DNS entry for the hostname you intend to use (or a wildcard), pointed to your keepalived IP
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.
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)
Emby Docker Swarm config
Create a docker swarm config file in docker-compose syntax (v3), something like the example below:
Fast-track with premix! 🚀
I automatically and instantly share (with my sponsors) a private "premix" git repository, which includes necessary docker-compose and env files for all published recipes. This means that sponsors can launch any recipe with just a
git pull and a
docker stack deploy 👍.
🚀 Update: Premix now includes an ansible playbook, so that sponsors can 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
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.
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 📓
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.