For years I was dedicated to my craft of buying records of vinyl, ripping the songs to WAV and Djing alongside my digital collection of music compiled over years from various sources. More recently, I've found myself almost entirely converted to the use of Spotify! However, some of my more obscure soundcloud downloads and vinyl rips are missing from Spotify and so an Azure based Plex server, and the Plex app on my laptop and phone are the perfect solution.
I followed the steps from this video https://youtu.be/ylklaOXz8Fc with a few tweaks along the way.
- Download Plex Media Server from https://www.plex.tv/media-server-downloads/. In this tutorial, I will use a Linux VM and so downloaded the Linux version of Plex.
- Create a resource group. Mine is called 'Plex'.
- Inside 'Plex' RG, create a storage account. Mine is called 'alexplex'.
- Once created, inside your storage account e.g. 'alexplex', click File shares (under File Service) and add a File share. Mine is called 'plex' and I set the Quota as 1024.
- Inside 'Plex' RG, create a virtual network. Mine is called 'plex-vnet'.
- Inside 'Plex' RG, create a Linux virtual machine. I used the most recent Ubuntu Server OS image available on the Azure Marketplace. I used a B1s VM and mine is called 'plex-LVM1'.
- Link the previously created storage to the VM.
- Click on Network Security Group, and add an inbound rule for 1001 port.
- Validate and Deploy VM. Once deployed, copy the public IP address for the VM.
- As I'm using a Linux VM, I am going to use PuTTy. Download PuTTy from https://www.ssh.com/ssh/putty/linux/
- Open PuTTy and paste your VM's IP address into the Host Name field.
- Click the plus next to SSH on the left panel, then click Tunnels.
- Enter 8888 into the Source port field and localhost:32400 in Destination field.
- Click Session on the left panel, save this PuTTy configuration, and then click Open.
- Enter your password to log in to the VM.
- Enter the following commands:
sudo mkdir /downloads
cd /downloads/
sudo wget https://downloads.plex.tv/plex-media-server-new/1.20.0.3181-0800642ec/debian/plexmediaserver_1.20.0.3181-0800642ec_amd64.deb
sudo dpkg -i plexmediaserver_1.20.0.3181-0800642ec_amd64.deb
- Open a browser window and type http://localhost:8888/web into the address bar.
- Log in with your Plex account and go through the steps to setup the Plex Server.
- When at the main Plex homescreen and ready to add media, return to the Azure Portal.
- Find your File share e.g. 'plex' and click Connect.
- Copy the command for Linux.
- Open PuTTy and run this command to mount your file share to a directory on the VM.
- Return to Plex, and click to Add Library. Browse for Media Folder and select the folder on your file share.
- Open Azure Storage Explorer. You may need to install this if it is not installed on your local machine.
- Add your Azure account and sign in
- Find your File share e.g. 'plex' and start to add your media from your local machine to the File share
- Open Plex and see your files begin to show :)
Can you break down the costs you have experienced? If possible separate the infrastructure cost from the bandwidth?
This is great! Quick question, about how much does the storage and vm cost you per month to run?
Thanks both for the comments. Here is the invoice for my Plex resource group Feb 15-March 14:
Storage
£28.68
Virtual Machines
£5.61
Virtual Network
£1.79
Bandwidth
£0.08