Want to run Plex Media Server on Ubuntu (DigitalOcean) and Azure storage?

Bert Kooij
5 min readApr 19, 2020

--

First I would like to start with stating that I am not affiliated with DigitalOcean or Microsoft Azure. This is a personal project and I am just sharing my opinion and findings for whoever is interested in an equal setup.

What is the point?

For a few years I am running Plex Media Server on a NAS (network-attached storage) from Western Digital. And it is working fine. The NAS is also in use as a network storage. And since the system is running for a few years a lot of files are stored on it. The storage is almost completely full.

Only 53,9gb left

So, one way or another there is need for a little investment here. And since it’s 2020 the ‘cloud’ is a real possibility. Currently the NAS is eating through 2x 1TB hard drives. The NAS in question is a WD My Cloud EX2 Ultra with two bays for hard drives. In order to get more storage I would need to change at least one of the hard drives for something like a 2 or 4TB variant (currently costing about €60,- / €90). But there is another thing bothering me. Although WD My Cloud supports RAID, I am not using it since it would cost twice the amount of storage. This is a risk for the video’s. photo’s and other important files that are stored on that machine. For example some old digitalized video tapes of me and my family are stored on it.

So in order to make a full comparison, would it be possible to run the Plex Media Server on a cloud based version? Lets try out.

What is the setup?

The setup I am aiming for is a Ubuntu server on DigitalOcean and cloud storage from Azure. There are other options available but since I’ve got experience with both systems and accounts for both platforms this is my first choice.

I started with:

  • Cheapest droplet (1gb memory, 1CPU, 25gb SSD disk)
  • Azure File Share
Cheapest Droplet

Installing Plesk was very easy:

  1. Download the correct distribution from Plex: https://www.plex.tv/en-gb/media-server-downloads/ (Choose distribution > Ubuntu 16.04+ Intel/AMD 64-bit. You can easily right click on the link and copy the link address).
  2. Once signed in with SSH on your droplet run:
wget https://downloads.plex.tv/plex-media-server-new/1.19.1.2645-ccb6eb67e/debian/plexmediaserver_1.19.1.2645-ccb6eb67e_i386.deb plex.deb

Replace the url with the latest version.

3. Install Plex

sudo dpkg -i plexmediaserver_1.19.1.2645-ccb6eb67e_amd64.deb

Check status:

systemctl status plexmediaserver
Plex Media Server active

4. Add the Plex Media Server to your account from your webbrowser:

{{IP}}:32400/web/setup

Sign in or create an account and complete the setup.

Mounting Azure Storage

Create a new storage account within Azure Portal. And add a new file share. I called mine ‘media’. I followed the guide from Microsoft:

Basically the process is to install the necessary packages, connect your account to Azure CLI and then mount the storage.

The only trouble I had was connecting Azure CLI with the account. You will be presented with a short verification code which you will need to enter in https://aka.ms/devicelogin. But the sign in process closed down mediately after entering az login so after connecting the code to the Microsoft account it was not registering it back. I ended up running the verbose version and it waited for the correct validation:

az login --verbose

After that all the files stored into the file share was picked up by Plex. On Windows I use the Microsoft Azure Storage Explorer for uploading the files:

Adding the file share as a network drive on Windows 10 is not working for me since the required port (445) is blocked by my ISP.

What are the costs?

Since I am only running this setup for a couple of days it is still a bit early to present the monthly costs. The droplet is costing $5 a month and I am surprised with the speed and transcoding it is able to give.

The costs of Azure a bit higher than expected. The storage costs itself will be around €25 a month for 500gb of storage. But since I am uploading large batches of files the bandwidth usage is higher than expected. Once the files are stored the bandwidth usage will be much lower.

Costs after running a couple of days

Once the setup is running for a while and the bandwidth usage is back to a few uploads and views a month I will update this blog with the costs involved.

** Update September 2020 **

Plex is running for a few months now, this is an overview of the costs of the first two months:

The Azure costs of April were quite steep, I have uploaded 250gb of content until now. I stopped uploading in May, since I wanted to know whether the costs would be economy liable when running the system only with some uploading and watching.

In the month May I frequently watched some content. Average of 1–2 hours a day. Some low quality and some HD. The $5 droplet is running smooth, it’s coping well with transcoding the video’s, no issues so far. The costs of $15 for the month May are way better than the costs for the first month 😅. (Please note, this does not include the costs of Plex pass $5).

Bandwidth usage last 90 days (June 2020)
Play history last 90 days (June 2020)

In the upcoming months I will probably upload more content to the Azure disk, let’s see what that does to the costs. To be continued…

Do I recommend it?

I will get back with more details and a final conclusion once it’s running for a while.

--

--