DEV Community

Cover image for Deploying Emby Personal Media Streaming on Ubuntu 24.04
Sanskriti Harmukh for Vultr

Posted on with Aashish Chaurasiya • Originally published at docs.vultr.com

Deploying Emby Personal Media Streaming on Ubuntu 24.04

Emby is a personal media server that organizes and streams your movies, TV shows, music, and live TV to any device, with apps across platforms and optional premium features. This guide deploys Emby using Docker Compose with Traefik handling automatic HTTPS. By the end, you'll have an Emby media server streaming securely at your domain.


Set Up the Directory Structure

1. Create the project directory structure:

$ mkdir -p ~/emby-server/{config,media}
$ cd ~/emby-server
Enter fullscreen mode Exit fullscreen mode

2. Create the environment file:

$ nano .env
Enter fullscreen mode Exit fullscreen mode
DOMAIN=emby.example.com
LETSENCRYPT_EMAIL=admin@example.com
Enter fullscreen mode Exit fullscreen mode

Deploy with Docker Compose

1. Create the Docker Compose manifest:

$ nano docker-compose.yaml
Enter fullscreen mode Exit fullscreen mode
services:
  traefik:
    image: traefik:v3.6
    container_name: traefik
    command:
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
      - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
      - "--certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web"
      - "--certificatesresolvers.letsencrypt.acme.email=${LETSENCRYPT_EMAIL}"
      - "--certificatesresolvers.letsencrypt.acme.storage=/letsencrypt/acme.json"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "letsencrypt:/letsencrypt"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    restart: unless-stopped

  emby:
    image: emby/embyserver:latest
    container_name: emby
    hostname: emby
    expose:
      - "8096"
    volumes:
      - "./config:/config"
      - "./media:/media"
    environment:
      - TZ=UTC
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.emby.rule=Host(`${DOMAIN}`)"
      - "traefik.http.routers.emby.entrypoints=websecure"
      - "traefik.http.routers.emby.tls.certresolver=letsencrypt"
      - "traefik.http.services.emby.loadbalancer.server.port=8096"
    restart: unless-stopped

volumes:
  letsencrypt:
Enter fullscreen mode Exit fullscreen mode

2. Start the services:

$ docker compose up -d
Enter fullscreen mode Exit fullscreen mode

3. Verify the services are running:

$ docker compose ps
Enter fullscreen mode Exit fullscreen mode

4. View the logs:

$ docker compose logs
Enter fullscreen mode Exit fullscreen mode

Configure Emby

  1. Open https://emby.example.com in a browser.
  2. Select your display language.
  3. Create the administrator credentials.
  4. Add media libraries pointing to folders under /media.
  5. Enable remote access.
  6. Accept the terms and complete setup.
  7. Sign in with the administrator account.

Next Steps

Emby is running and streaming securely over HTTPS. From here you can:

  • Install Emby apps on your TV, mobile, and desktop devices
  • Enable hardware transcoding with an Emby Premiere subscription
  • Create user accounts with parental controls and per-library access

For the full guide with additional tips, visit the original article on Vultr Docs.

Top comments (0)