Emby is a media server that organises your movies, shows, music and photos, and streams them to apps on TVs, phones and browsers. It sits between Plex (polished, account-centric) and Jellyfin (fully open source, which forked from Emby in 2018). The core is free, and Emby Premiere unlocks features such as hardware transcoding, offline sync and DVR. Here’s how to run it on a Linux server.
Comparing options? See Jellyfin vs Plex vs Emby.
Requirements
- A VPS or dedicated server with 2+ vCPU and 2–4 GB RAM. More is needed if you transcode.
- Storage for media (a storage VPS or a dedicated server with big disks). See storage VPS.
- Docker (recommended) or the official package.
As with any media server on a VPS without a GPU, prefer direct play (compatible formats on the client) over CPU transcoding. Only stream content you have the rights to.
Option 1: Docker
# /opt/emby/compose.yaml
services:
emby:
image: emby/embyserver:latest
restart: unless-stopped
environment:
UID: 1000
GID: 1000
GIDLIST: 1000
ports:
- "127.0.0.1:8096:8096" # HTTP, behind a reverse proxy
volumes:
- /opt/emby/config:/config
- /srv/media/Movies:/mnt/movies
- /srv/media/TV:/mnt/tv
- /srv/media/Music:/mnt/music
cd /opt/emby && docker compose up -d
For first-time setup on a remote server, either temporarily bind to the public IP with a firewall rule for your IP only, or use an SSH tunnel:
ssh -L 8096:127.0.0.1:8096 user@your-server
# open http://localhost:8096
See SSH tunnels.
Option 2: official package (Debian/Ubuntu)
Download the current .deb from Emby’s website, then:
sudo apt install ./emby-server-deb_*_amd64.deb
sudo systemctl enable --now emby-server
Give the emby user read access to your media folders. See Linux file permissions.
Initial setup
- Create the admin user. Use a strong password.
- Add libraries: Movies, TV Shows, Music and so on, pointing at the mounted folders. Use Emby’s naming conventions (e.g.
Movie Name (2021)/Movie Name (2021).mkv,Show/Season 01/Show S01E01.mkv) for accurate metadata. - Pick your metadata languages and providers.
- Let the scan finish. Large libraries take a while.
Users and parental controls
Create separate users for household members, and restrict access per library, by ratings, and by device or schedule. Each user gets their own watch history and resume points.
Remote access with HTTPS
Put Emby behind Nginx (or Caddy) with Let’s Encrypt:
server {
server_name emby.example.com;
location / {
proxy_pass http://127.0.0.1:8096;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
# listen 443 ssl; certbot --nginx -d emby.example.com
}
In Emby’s Settings → Network, set the external domain and port (443) so apps connect correctly. See Nginx WebSocket proxy and Let’s Encrypt.
Transcoding and Emby Premiere
- Software transcoding works for free, but is heavy on CPU.
- Hardware transcoding (Intel Quick Sync, NVIDIA, VAAPI) requires Emby Premiere and a GPU passed through to the server or container. That’s typically a dedicated server or home hardware.
- Set a sensible remote streaming bitrate limit per user, to protect bandwidth. See vnStat.
Backups and updates
- Back up
/opt/emby/config(or/var/lib/embyfor package installs), which holds the library database, users and settings. See backup strategy. - Update the container (
docker compose pull && docker compose up -d) or the package. Read the release notes first. See updating self-hosted apps.
Security
- HTTPS only, strong passwords, and no unused admin accounts.
- Don’t expose port 8096 directly to the internet. Use a reverse proxy or a VPN.
- Keep the server patched. See Linux server hardening.
Quick reference
| Task | Command / setting |
|---|---|
| Start (Docker) | docker compose up -d |
| Web UI | port 8096 (behind Nginx) |
| Service (package) | systemctl status emby-server |
| Config to back up | /config volume or /var/lib/emby |
| Hardware transcoding | Emby Premiere + GPU |
Related: Jellyfin media server and Plex media server.