Private streaming server with Raspberri Pi and Emby on Docker


This guide will show you how to create a personal media streaming server with Raspberry PI and Emby.

We’ll use also an USB device to collect our media files to be streamed. This device will be simply a flash disk in my test, but the procedure is the same for an USD Drive. An alternative option could be using a NAS. To have a working configuration, we’ll erase the USB disk, to take care to have an empty one or you could loose all existing data inside it.

Follow peppe8o posts on -> Twitter

What Is Emby

As described on its official website, Emby aims to bring together personal videos, music, photos and live television.

It is installed as a server, and can be accessed from app or web browser. It also allows to stream your media to DLNA devices or Chromecast to simplify connection. Emby is also compatible with a number of apps.

It has also a parental control, so that you can easily control what your children are watching and filter content. It can be installed on many platforms.

What We Need

Raspberry PI 4 model B image

As usual, I suggest adding from now to your favourite e-commerce shopping cart all needed hardware, so that at the end you will be able to evaluate overall costs and decide if continue with the project or remove them from the shopping cart. So, hardware will be only:

Check hardware prices with following links:

Amazon raspberry pi boards box
Amazon Micro SD box
Amazon Raspberry PI Power Supply box

Steb By Step Guide

Prepare OS environment

So, start from installing Raspberry PI OS Lite. Then, move on with Docker installation.

Enable USB Mount at boot

We’ll use an USB drive to write data. So, we need to be sure that at every boot the USB Disk will be ready, without struggling on mounting it from terminal. For this purpose, I’ll use USBmount. Type on terminal:

sudo apt install usbmount

To be sure it will works, we need to change the line PrivateMounts=yes to PrivateMounts=no in “/lib/systemd/system/systemd-udevd.service”. Type

sudo nano /lib/systemd/system/systemd-udevd.service

and change the line (should be on line 27). If we want to make USB drive writable from users (not only from root), we need to edit usbmount.conf:

sudo nano /etc/usbmount/usbmount.conf

identify “FS_MOUNTOPTIONS” and edit it as follow:



  • vfat is the filesystem
  • umask=0000 is the permission of the file and folder. 0000 means rwx-rwx-rwx

Reboot the Raspberry PI and plug in your UDB Disk. Now, the simple command “mount” should list the following line within the other mounted devices:

/dev/sda on /media/usb0 type vfat (rw,nodev,noexec,noatime,nodiratime,sync,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)

Prepare Your USB Device

I experienced some issues formatting my USB disk in FAT32. The only way I found to have a working installation was to format in ext4 the flash disk. Be aware: this operation will erase ALL your data in your USB disk.

According with an askUbuntu guide (, identify the USB drive among all storage partitions and volumes on your computer use:


You can also use:


Suppose it may be /dev/sda. Unmount it with:

sudo umount /dev/sda

To format drive with the ext4 file system format:

sudo mkfs.ext4 /dev/sda

Reboot to have it mounted and ready to be used for our docker volumes.

NOTE: in next section I’ll assume that your USB Disk is the only disk plugged on RPI. This should assure that at the boot it will be mounted on “/media/usb0”.

Install Emby with Docker

Installing Emby Server via Docker is simple and fast. The only thing to care is in downloading the right package, built for Armv7.

docker run -d --name emby-server --restart unless-stopped \
-v /media/usb0/config:/config \
-v /media/usb0/share1:/mnt/share1 \
-p 8096:8096 \
-p 8920:8920 \
-p 1900:1900/udp \

At this point, you should be able to access in your favourite web browser with the address http://<<YOUR_RPI_IP_ADDRESS>>:8096

The first page, lets you choose the preferred language. Select and press Next:

Emby installation page1

The following page asks the first user and its password. Compile and press next. NOTE: if you have an Emby account, here you can specify it.

Emby installation page2

It’s time to specify media folders:

Emby installation page3

Remember that here you’ll map paths as seen inside Docker container, independently from host mount. So, the share folder upon configured will be available on /mnt/share1 (inside the container) even if it is available on RPI host at /media/usb0/share1.
Let’s try to create a music folder and add it to Music media library. Go back to terminal and create a folder by typing:

sudo mkdir /media/usb0/share1/music

go back to browser and click on “Add Media Library”. Select Music on Content Type field.

Emby installation page4

Then press the cross button near “Folder” label. Here select in “Folder” field the path “/mnt/share1/music”:

Emby installation page5

Press Ok. Back to the previous page, you can configure your preferences or simply press ok (these settings can be changed later). You’ll se your Music box available:

Emby installation page6

You can use the same procedure for other media or simply continue setup and add other Media Library later.

Press Next to move on preferred language settings for metadata:

Emby installation page7

Once setted up, press next:

Emby installation page8

Here you can configure Remote access or leave as is to allow remote connections. Press Next:

Emby installation page9

Carefully read the 50 pages of Privacy policy and the 80 pages of Terms of Service. If you don’t accept, just burn all and blame yourself… OR accept them by flagging the small square and press Next:

Emby installation page10

Click Finish to complete setup. On next screen login to use your new Streaming Server.


How useful was this post?

Click on a star to rate it anonymously!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?