A couple of days ago I grabbed a great deal on the Amazon Fire TV Stick 4K. Apart from Amazon’s own content players, it also comes with 3rd party online streaming apps like Netflix or Apple TV. However, when it comes to local media players, the options are rather limited.
As far as I can say, the only officially supported streaming app for all those movies and TV shows stored locally is the Plex player. There is a way to install the ever-popular KodiTV player but from what I could find, it is not an easy process and requires playing with some repositories of unknown quality. So I decided to move from Kodi, which I used for many years, to Plex.
What you’ll need
To be able to build your Plex server and NAS, you will need a few things:
- Raspberry Pi – I’d recommend version 4 for more juice but 3B+ will do the job as well
- microSD card – a fast one, 16GB capacity will do. Most of them come with an SD card adapter but if you don’t have an SD card reader on your computer then you’d need to get a microSD USB dongle.
- Power adaptor for the Pi – 3A for Raspberry Pi 4 or 2.5A for 3B+ (official adaptors are advised)
- Raspberry Pi case – again, what kind of case will differ on whether you go with ver. 4 or 3B+
- Network Cable – WiFi is great but trust me Ethernet is better, especially on the Raspberry Pi 4!
- External hard drive – the type and capacity is up to you but to maximise speed, get one with a USB3 connection
There are also Raspberry Pi bundles, which come with all the bells and whistles (power adaptors, microSD card, cables, case, etc.), and at a good price, too.
A note about external hard drives: if you plan to use portable laptop-sized (2.5″) hard drives then you might need a powered USB hub because each of these drives draws a lot of power. The Raspberry Pi can handle one of those hard drives but when you connect a second one then neither drive will work (they’ll sound like they’re trying to spin up but fail – not a pleasant sound, mind you).
Getting the Raspberry Pi up and running
Before the NAS and media server can be installed, we need to install an operating system onto the Raspberry Pi. Since we don’t need the graphical user interface we can use Raspberry Pi OS Lite. To install it, grab the Raspberry Pi Imager app on https://www.raspberrypi.org/software/ and check the video below. In Step 2, choose Raspberry Pi OS (other) and then pick Raspberry Pi OS Lite (32-bit).
When you’re done, don’t remove the microSD card from your computer just yet – if it automatically ejected/unmounted after the verification process completed, pull the card out and then insert it back in. We will need to enable SSH access to the Raspberry Pi before we can stick the microSD card into that little machine.
To enable SSH access, place an empty file called
ssh (no extension) onto the boot partition of the microSD card. Now, we’re ready to roll.
If you use an ethernet cable to connect your Raspberry Pi to your network router then you’re ready to continue to install the NAS server. If you prefer to go with a WiFi connection instead, check the official Wireless connectivity doc first.
Initial Raspberry OS setup and updates
Our NAS server will be powered by OpenMediaVault software. Before we install it, we’ll do a quick update and upgrade to the Raspberry Pi OS.
Connect to your Raspberry Pi via SSH – use PuTTY on Windows or Terminal on macOS to do so.
ssh email@example.com or
ssh pi@someIPaddress (you can find the IP address by checking your network router’s connected device list). The default password for a freshly installed Raspberry OS is
It is a good idea to update the password to something else. You can do so in raspi-config. Type
sudo raspi-config and hit Enter, this is what you should see:
With the first line highlighted, hit Enter and then go to line S3 Password. Hit Enter again and then follow instructions to change your password. If you’d like you can also change the hostname of your Raspberry Pi using the S4 Hostname option from
raspberrypi to something else.
When you’re done, it is time to reboot the system. Type
sudo reboot now and press Enter. Your Raspberry Pi will reboot. Be aware that if you changed the hostname and you connect to SSH using the hostname then you will need to use the new hostname in the SSH command:
ssh pi@newhostname. When it asks you for a password, use the new one you created in raspi-config.
Time to update and upgrade the Raspberry Pi OS. Connect to your Raspberry Pi via SSH (if you’re not already) and then run these two commands:
sudo apt update, hit Enter and let it do its thing.
sudo apt upgrade, hit Enter again. If it asks you to confirm, type Y and hit Enter. It will take a while to finish so you might as well get yourself a cup of coffee 🙂
When all is done, we can move on to installing our NAS server.
Installing OpenMediaServer NAS software
Installation of OpenMediaServer is rather easy. A lot easier than configuring it, actually 😀 Copy and paste this command into your PuTTY/Terminal app:
wget -O - https://raw.githubusercontent.com/OpenMediaVault-Plugin-Developers/installScript/master/install | sudo bash
This will download and install OpenMediaVault and its components. It can take some time so enjoy that cuppa you made during the Raspberry OS update and upgrade! When the installation process is complete, reboot your Raspberry Pi by issuing the
sudo reboot now command.
Firing up OpenMediaServer for the very first time
When your Raspberry Pi is done rebooting, open up your web browser and enter
http://raspberrypiIPaddress into the address field and hit Enter.
You should see a nice blue login page. Use
admin as user name and
openmediavault as password. As with the default password for SSH access to your Raspberry Pi, it is advisable to change the default password for OpenMediaVault, too. Click General Settings on the left, switch to Web Administrator Password, enter your new password twice, and then click Save.
Mounting external hard drive and creating a share
At this point, make sure your external hard drive is connected to one of the USB ports on the Raspberry Pi. When ready, go to File Systems. You should be seeing a list of storage devices. Find yours and check the Total, Available and Used columns. If they show n/a instead of a numeric value then you need to highlight your drive and click the Mount button.
A note on the file systems: OpenMediaVault supports several different file systems but since your Raspberry Pi runs a Linux-based operating system I would recommend formatting the external drive to ext3.
Once the external drive is mounted, we need to create a shared folder. Go to Shared Folders under the Access Rights Management section and click + Add button:
- Type your desired shared folder name into the Name field.
- Select a device where the shared folder will be stored from the Device dropdown menu. It should list your external drive (if it doesn’t, go back to the part about mounting an external drive in File Systems).
- Pick permissions in the Permissions dropdown. My personal preference is Administrator: read/write, Users: read/write, Others: no access.
When you’re ready, click the Save button. A yellow warning should pop up at the top of the page, click the Apply button. Beware, applying changes of any kind can take a significant amount of time so be patient and do not reload the page.
Enabling SMB file sharing and creating a user
Now that our shared folder is created, we need to put it to use. We need to enable SMB sharing and create a user that will be authorised to access this share.
To enable SMB sharing, go to Services -> SMB/CIF and toggle the Enable switch in General Settings on the Settings page. Click Save.
Switch to the Shares tab and click + Add button to make use of the shared folder. Update settings so that they look like in the screenshot below (your Shared folder name might differ though so pick whichever you created earlier in the process). Make sure the Enable permission inheritance is ON!
Click the Save button.
Now we need to add a user who will be able to access that SMB share. Go to Access Right Management -> User, click + Add button and fill in Name (no spaces, please) and Password/Confirm password fields. Leave everything else blank/unchanged. Click the Save button. A warning strip will pop up at the top of the page, click the Apply button to accept the changes.
You should see your new user name on the list of users and it should be assigned to a ‘users’ group. The ‘pi’ user is the user under which the Raspberry Pi OS is installed, no need to do anything about it.
To allow your newly created user to access the SMB share, go to Access Rights Management -> Shared Folder, highlight the shared folder line, and then click the ACL button. Select the top-level shared folder (in case you already have content on the shared drive like I did), set permissions for your user (on the first line in the User/Group permissions section) to Read/Write by ticking the checkbox. You can leave everything else untouched and click the Apply button.
If you do have content on the shared drive already, make sure to toggle the Recursive switch so that the new access rights are applied to all items on the drive.
Click the Close button after the changes are applied. Gratz! You just created a NAS! 🙂
Installing Plex Media Server
There were times when Plex Media Server was available as a plugin for OpenMediaVault. Not anymore. Luckily, installing the Plex package is pretty straight forwards. Connect to your Raspberry Pi via SSH again and issue the following command:
This will download the installation package from Plex.TV servers. Run
sudo apt install ./plexmediaserver_126.96.36.19930-6c22540d5_armhf.deb afterwards. This will install the Plex server and all its components. When it’s finished, reboot the Raspberry Pi.
Before you run the Plex server for the first time
Before we can run the Plex server configuration wizard, we need to allow the Plex server to access/manage all those cool movies and tv shows we stored on the NAS drive(s). If we don’t, we won’t be able to add anything to the media library.
Go back to your OpenMediaVault page, Access Rights Management -> Shared Folders, highlight/select your shared folder and click the ACL button. In the User/Group permission section, scroll down the list of user accounts until you see
plex. Tick the checkboxes to give the plex user and user group full read/write permissions and then click the Apply button. Don’t forget, if you already have media on the shared drive, toggle the Recursive option to apply permissions to files and subfolders.
When the changes are applied, click the Close button. Ready to move over to our Plex server admin now.
Running the Plex server wizard
This is actually the last step in setting up our NAS/Plex Server device based on the fantastic Raspberry Pi! Go to
http://raspberryPiIPaddress:32400/web in your web browser to get the wizard going. To complete this wizard, I would point you to a pretty detailed official document on Plex’s website.
If you made it all the way here, and everything seems to be working for you, then well done and congrats on building your very own NAS and media centre on a budget! 🙂
If you have any questions or suggestions, drop me a message in the comments.