10
DIY Home Media Server
Sometimes there is no Internet connection in my area and since there is not much you could do at that time, I love to watch a movie and listen to my all times favorite music.
All the code is mentioned using $ ......
and you can run it in terminal
- Raspberry Pi
- USB hard drive
If you have a new raspberry pi you may wish to Download and install OS in it.Download OS from the official link
To install just flash the OS to a memory card and attach it to raspberry pi.
- wifi
- ethernet
Here you may want to have a fixed Local Network IP since this is what you will connect to for ssh and Plex server
$ sudo apt update && sudo apt upgrade
If you intent to use GUI in raspberry pi you can skip this step.
As we are using it as a server we can use remote access tool
- Install an open-ssh server.
To startup CLI as system Boots up.
$ sudo raspi-config
- Boot option
- Desktop / CLI
- choose Console
$ sudo reboot
sudo nano /boot/config.txt
- > set max_usb_current=1
-
$ mkdir /media/hd
(if using NTFS drive install ntfs-3g)
Here we will use uuid or partuuid and mention it in /etc/fstab, and when raspberry pi will boot it will auto-mount it to our desired location.
$ sudo blkid
get the UUID of your device
finally, add the device in the /etc/fstab
--> make sure you have a backup in case you mess-up or something went wrong.$ sudo nano /etc/fstab
attach your device using UUID or partuuid
sample file
PARTUUID=06568f1 /media/hd/ auto nofail,uid=1000,git=1000,umask=000 0 0
Download plex directly from Website
You will download a .deb file
-
To excute it
-
$sudo dpkg -i ./plexserver....deb
-
When installation is completed you may wish to reboot.
Now open a browser and head over to IP/web/index.html of your raspberry pi (in my case IP is 192.168.1.100)
--> 192.168.1.100:32400/web/index.htmlYou will need to log in to plex to continue.
-
Adding library
- select the media type
- select the folder
- When you are done it will sync the resources and you are good to go.
since like me you may want to watch content from Plex even when there is no internet connection
- settings
- Server
- Network
- enable local network discovery
- Click on Advance Settings
- list of IP addresses and Networks allowed without Auth. You can add specific IP's or you may go with something like '192.168.0.0/24'
Well,for syncing I am currently using tools like rsync
. Have better options comment down.