Wiki > Emby
Emby is a personal media server with apps on just about every device. Bringing all of your home videos, music, and photos together into one place has never been easier. Your personal Emby Server automatically converts and streams your media on-the-fly to play on any device.
Installation
Connect to your slot through SSH.
Emby .NET Core (version 4)
-
Download the .NET Core runtime
wget https://download.visualstudio.microsoft.com/download/pr/7d44ddeb-ad35-41a8-a581-03b151afbd80/6888586c28836b1e1f71df879184550b/aspnetcore-runtime-6.0.10-linux-x64.tar.gz
-
Extract the .NET Core runtime archive
mkdir -p $HOME/dotnet && tar zxf aspnetcore-runtime-6.0.10-linux-x64.tar.gz -C $HOME/dotnet
-
Update
.bashrc
to use .NET Coreprintf "PATH=\$HOME/dotnet:\$PATH\nDOTNET_ROOT=\$HOME/dotnet\n" >> ~/.bashrc && source ~/.bashrc
-
Download Emby (one line command)
wget -O embyserver-netcore-latest.zip `curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | awk '/browser_download_url/ && /embyserver-netcore/ {print $2;exit}' | sed 's/"//g'`
-
Prepare the
EmbyNET
directory and extract the archivemkdir -p ~/EmbyNET/ ~/.programdata/ ln -s ~/.programdata/ ~/EmbyNET/programdata unzip -o ~/embyserver-netcore-latest.zip -d ~/EmbyNET/
-
Start Emby briefly to create configuration files.
dotnet ~/EmbyNET/system/EmbyServer.dll -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
-
Wait for it to finish outputting information and then press Ctrl+C to shut it down. Emby may shut down on its own with an error.
-
Run these
sed
commands to change the port Emby runs on:sed -i 's/8096/15991/g' ~/EmbyNET/programdata/config/system.xml sed -i 's/8920/17995/g' ~/EmbyNET/programdata/config/system.xml
-
Start Emby in a screen session running in the background
screen -dmS embynet dotnet ~/EmbyNET/system/EmbyServer.dll -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe
-
Clean up your slot (optional)
rm embyserver-netcore-latest.zip aspnetcore-runtime-6.0.10-linux-x64.tar.gz
Check the Usage section of the article to finish setup.
Automatic restart
-
Make a file to be used for the script.
touch ~/emby_restart.cron
-
Edit the file and enter the text below.
nano -w ~/emby_restart.cron
#!/bin/bash if pgrep -fx "dotnet /home/user/EmbyNET/system/EmbyServer.dll -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe" > /dev/null then echo "Emby is running." else echo "Emby is not running, starting Emby" screen -dmS embynet /home/user/dotnet/dotnet /home/user/EmbyNET/system/EmbyServer.dll -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe fi exit
-
Save the file with Ctrl+x and the "y" and Enter to accept overwriting.
-
Make the script executable.
chmod +x ~/emby_restart.cron
-
Open your crontab.
EDITOR=nano crontab -e
-
Enter the following text
@reboot /home/user/emby_restart.cron >/dev/null 2>&1 */5 * * * * /home/user/emby_restart.cron >/dev/null 2>&1
-
Save the crontab with Ctrl+x and the "y" and Enter to accept overwriting.
Usage
Your Emby web interface will be accessible at http://server.whatbox.ca:15991
Emby will run you through a setup wizard for creating a user and setting up your first libraries. You will not be able to navigate to your slot using the built-in filesystem navigator, so you will need to enter the full path to the directory you want to add to your library, for example /home/user/files
It is strongly recommended to setup authentication on your Emby instance. You can do this in Emby's web interface under the Settings > Users > Your user > Password category. You should not use your slot password here because the web interface does not use SSL. Click Save
to save the configuration.
It is strongly recommended to disable DLNA to prevent other users on the server from accessing your media. You can do this in Emby's web interface under the Settings > DLNA category. Uncheck all of Enable DLNA Play To
, Enable Dlna server
, and Blast alive messages
. Click Save
to save the configuration.
You can attach to your Emby screen session to monitor its output using screen -r emby
, and detach from it again by pressing ctrl+a
, d
and then enter
IMPORTANT
Emby is much more prone to abusing available resources than Plex. You must limit the CPU threads that Emby may use. We will terminate any instances of Emby running that are using so much CPU as to impact other users on the server. These settings can be found in Settings > Transcoding > Transcoding thread count. Guidelines for plans and the threads they may use follows:
- HDD: 4
- NVMe: 6
ClickSave
to save the configuration.
Updates
Emby will not update automatically. You will need to do the following (from the installation process):
-
Shutdown your Emby server by going into your Emby settings, clicking the power button, and then "Shut Down."
-
Connect to your slot through SSH.
-
Download Emby (one line command)
wget -O embyserver-netcore-latest.zip `curl -s https://api.github.com/repos/MediaBrowser/Emby.Releases/releases/latest | awk '/browser_download_url/ && /embyserver-netcore/ {print $2;exit}' | sed 's/"//g'`
-
Extract the archive into the relevant folders:
unzip -o ~/embyserver-netcore-latest.zip -d ~/EmbyNET/
-
Start Emby again in a screen session running in the background
screen -dmS embynet dotnet ~/EmbyNET/system/EmbyServer.dll -ffmpeg /usr/bin/ffmpeg -ffprobe /usr/bin/ffprobe