- Get the latest version of Raspbian LITE
- Download Etcher and install.
- Run etcher to burn raspbian onto your SD Card
- Place a file named
ssh
on the boot directory (you can mount the boot directory in disk utility) - Place the SD card into the pi and boot.
- Run
sudo raspi-config
to set up basic initial config. - Upgrade Raspbian
sudo apt-get update
sudo apt-get upgrade
- Check you have HTTPS transport package installed
sudo apt-get install apt-transport-https
- Install Plex Media Server package
wget -O - https://dev2day.de/pms/dev2day-pms.gpg.key | sudo apt-key add -
echo "deb https://dev2day.de/pms/ jessie main" | sudo tee /etc/apt/sources.list.d/pms.list
sudo apt-get update
sudo apt-get install -t jessie plexmediaserver
- Change plex user to pi
sudo nano /etc/default/plexmediaserver.prev
Change PLEX_MEDIA_SERVER_USER=plex
to PLEX_MEDIA_SERVER_USER=pi
- Restart plex
sudo service plexmediaserver restart
- Set your IP address as static
hostname -I
Copy the output from this command into the cmdline.txt
file
sudo nano /boot/cmdline.txt
add ip=127.0.0.1
(replace the ip with your ip) to the end of the text in the file
- Install NTFS-3G. This will allow you to use NTFS drives easily
sudo apt-get install ntfs-3g
- Retrieve the UUID of the devices you wish to mount
sudo blkid
Output should look like this
lrwxrwxrwx 1 root root 10 Jan 1 1970 0AC4D607C4D5F543 -> ../../sda1 Note down the value of the UUID --> 0AC4D607C4D5F543
- Create a location for mount point:
sudo mkdir /mnt/volume
Give proper permission:
sudo chmod 770 /mnt/volume
- Mount the USB Drive and then check if it is accessible at /mnt/volume
sudo mount -t ntfs-3g -o uid=1000,gid=1000,nofail,umask=007 /dev/sda1 /mnt/volume
- Now, we will configure RasPi to do this after every reboot: Take a backup of current fstab and then edit
sudo cp /etc/fstab /etc/fstab.backup
sudo nano /etc/fstab
Add the mount information in the fstab file (replace UUID with your own):
UUID=0AC4D607C4D5F543 /mnt/volume ntfs-3g auto,users,uid=1000,gid=1000,dmask=000,fmask=111,utf8,nofail 0 0
- Reboot
sudo reboot
Voila! You should be able to access your plex setup via 192.168.x.x:32400/web
How to set up a raspberry pi plex server
How to setup mount / auto-mount USB Hard Drive on Raspberry Pi
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.50-v7+/modules.dep.bin'
- Install
sudo apt-get update && sudo apt-get install transmission-daemon
- Stop Transmission
sudo systemctl stop transmission-daemon
- Edit the config file
sudo nano /etc/transmission-daemon/settings.json
Modify the following lines
"download-dir": "/media/the-hub/Movies",
"rpc-password": "raspberry",
"rpc-username": "pi",
"rpc-whitelist-enabled": false,
- Start transmission
sudo systemctl start transmission-daemon
Voila! You should now be able to log in via http://192.168.x.x:9091/transmission/web. using username pi, password: raspberry
REF: Set up transmission daemon on a raspberry pi
This guide is for if you wish to auto switch off your hard drives when they are not being used.
We will be using a package called hdparm
- Get the locator for your hard drives
sudo blkid
Copy the /dev/sdx
. Don't include the additional 1/2/3 on the end.
- Install hdparm
sudo apt-get update
sudo apt-get install hdparm
- Modify the hdparm config
sudo nano /etc/hdparm.conf
- Add a configuration to the bottom of the file for drive
/dev/sda {
spindown_time = 1
}
- Save and reboot
Quick way to access plex and transmission via the internet is to set up port forwarding on your modem. Set ports 32400
and 9091
to forward to the IP of the raspberry pi, and then use the external IP to access plex and transmission.