Installing Plex Media Server on Intel NUC
Since Ubuntu 18 and NUC 7 systems, installation of Plex Media Server on NUC computers has become very simple and straight forward.
Today’s NUC8 and above machines are easily capable of hardware transcoding with HEVC HDR → SDR tone mapping.
The recommended distribution is Ubunutu 20.04 LTS. Plex’s Linux package for Ubuntu has been overhauled to make installation very easy and informative. If any required software is needed it now tells you what you need to install and where you can find the recommended supplemental packages.
The process is:
- Install Ubuntu 20.04 LTS (or newer) on the NUC using Ubuntu defaults.
- Recommendation is to ensure the
/
partition has enough space to hold your metadata (256GB is recommended minimum, 512GB preferred)
- Mount your media sources (NFS or SMB or external USB) as appropriate. Ensure all users (which will include
plex
) can minimally READ the media files. (755/644 permissions) - Download PlexMediaServer directly from https://Plex.tv/downloads (AMD64)
- In a command line terminal window
cd ~/Downloads
sudo dpkg -i Plex_package_name_you_just_downloaded.deb
-
The installer will run (pre installation validation and post installation configuration)
-
Should there be issues with installation,
/tmp/plexinstaller.log
will contain the information needed to bring to the forum for assistance. -
Open a new browser window (Open an Incognito one if you have an existing Plex installation on another machine)
-
Open URL
http://127.0.0.1:32400/web
-
The setup wizard will now guide you through setup of your Plex server.
For those using older Debian-based OS versions, please consider the following
Plex Media Server with Intel NUC and Ubuntu 16.04 LTS
Contributed by: @grogster
HARDWARE
- Intel NUC (BOXNUC7I5BNK, i5-7260U 2,20 GHz, Link)
- 2 x 8GB DDR4 RAM (CT2K8G4SFD8213, Link)
- 250GB M.2 PCIe NVMe SSD (Samsung 960 EVO MZ-V6E250BW, Link)
This hardware setup is meant to be an allrounder. Fast enough to transcode multiple movies at the same time, almost completely silent in order to run it in the living room and power efficient in order to run it 24/7. It is able to hardware transcode three H.264 1080p movies at the same time with ~30-35% CPU load. Transcoding a single H.265 4K HDR movie has ~35-40% CPU load.
If you are looking for a single user setup this NUC might be overkill, the NUC i3 with 2 x 4GB RAM should be fine then.
Step 1: Install Ubuntu
-
Update BIOS with latest from Intel’s website
-
Install Ubuntu 16.04 LTS 64bit server version
-
Use the following partition scheme (ESP size was suggested by Ubuntu, swap size is much bigger than usual because of RAM transcoding):
#1: 536MB, ESP, bootable
#2: 64GB, swap
#3: 185,5GB, ext4 -
Setup user named
plex
Step 2: Install Plex Media Server
- Add plex repository as source
echo deb https://downloads.plex.tv/repo/deb/ public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
- Install Plex Media Server + dependencies
sudo apt-get update && sudo apt-get install avahi-daemon avahi-utils plexmediaserver
- During installation you will be asked if you want to override the plex repository source with the one from the package. Select
yes
.
- Re-enable plex repository source
- By default the plex repository source from the package is disabled (commented out), enable it in
/etc/apt/sources.list.d/plexmediaserver.list
- By default the plex repository source from the package is disabled (commented out), enable it in
Step 3: Setup NFS and Autofs
- Install dependencies
sudo apt-get install autofs nfs-common
- Create mount directory and configure Autofs
sudo mkdir /data
sudo nano /etc/auto.master
- Append the following line at the end of the file:
/data /etc/auto.data
- Create Autofs configuration file for data directory
sudo cp /etc/auto.misc /etc/auto.data
- Append all your mount points at the end of the file, for example:
movies -fstype=nfs4 <ip-of-your-nas>:/volume1/Movies
music -fstype=nfs4 <ip-of-your-nas>:/volume1/Music</pre>
- Restart Autofs
sudo systemctl restart autofs
- All your mount points are now available at
/data/...
- Autofs will automatically unmount all mount points if there is no access within 5 minutes and remount if you try to access the mount point. You can keep ghost references to the mount points by adding
--ghost
inauto.master
at the end of the appended line
Step 4: Configure Plex Media Server
- Open
http://<ip-of-your-server>:32400/web
in your browser and configure your server
Step 5: Setup RAM transcoding
- Create transcoding directory
sudo mkdir /tmp/transcoding
- Setup the system to mount the RAM disk on every boot
sudo nano /etc/fstab
- Append the following line:
tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,size=64G,mode=1777 0 0
- Grant writing permissions for the transcoding directory
sudo chown -R plex:plex /tmp/transcoding
- Use
/tmp/transcoding
in Plex Media Server > Settings > Server > Transcoder > Temporary directory
Additional notes / tips
- In order to update plex media server it is enough to run the system update:
sudo apt-get update && sudo apt-get upgrade
- If you setup a DDNS service for your server consider to configure the Ubuntu firewall. In that case please check out the Plex reference for which ports you need to allow
Again, special thanks to @grogster for all the time and effort put forth to make this guide possible.