Infrastructure Setup
This is how to install Emby on a Linux server and connect it to an external NAS via NFS. For my setup I have an Ubuntu server and a Synology DS923 NAS. I migrated the Emby installation to a Docker container but originally did bare-metal, so both are outlined below.
Option 1: Docker Installation (Recommended)
Using Docker encapsulates the application, making updates and maintenance significantly simpler.
- Install Docker:
- Deploy Emby:
First, create a
.envfile in your repository directory to define your environment-specific paths:
Then, create a docker-compose.yml file using variable syntax:
services:
emby:
image: emby/embyserver: latest
container_name: emby
network_mode: host
volumes:
- ${LOCAL_CONFIG}:/config
- ${MEDIA_LIBRARY}:/mnt/share
devices:
- /dev/dri:/dev/dri
environment:
- TZ=Your/Timezone
restart: unless-stopped
- Start the container:
docker compose up -d
Option 2: Native Linux Installation
- Version: 4.9.5.0
- OS: Ubuntu Server 22.04 LTS
Installation Steps
- Update repositories:
sudo apt update && sudo apt upgrade -y - Download the
.debpackage from the official Emby download page. - Install:
sudo dpkg -i emby-server-deb_4.9.5.0_amd64.deb - Enable service:
sudo systemctl enable emby-server && sudo systemctl start emby-server
Synology NAS NFS Mounting
- NAS Prep: Control Panel > Shared Folder > Edit > NFS Permissions. Grant access to your server's IP.
- Client Setup:
sudo apt install nfs-common - Mount Point: Create directory
sudo mkdir -p /path/to/nas - Persistent Mount: Add to
/etc/fstab: [NAS_IP]:/volume1/media /path/to/nas nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0- Verify:
sudo mount -a - Set Permissions Set the
embyuser to have755permissions on the directories within the NFS mountsudo chown -R emby:emby /mnt/media(Note: Ensure UID/GID matches your container user if using Docker)sudo chmod -R 755 /mnt/media
- Setup NFS Mount on Local Machine
- Windows
- Enable NFS Control Panel > Programs > "Turn Windows features on or off" > Check "Services for NFS".
- Mount: Open Command Prompt as Administrator.
mount -o anon \\NAS_IP\volume1\media Z:
- Linux
- Install Utils:
sudo dnf install nfs-utils - Mount:
sudo mount -t nfs NAS_IP:/volume1/media /path/to/nas
- Install Utils:
- Windows