{"id":18260739,"url":"https://github.com/bdevans/plexberry","last_synced_at":"2025-09-21T16:32:47.136Z","repository":{"id":140055669,"uuid":"104758836","full_name":"bdevans/plexberry","owner":"bdevans","description":"Scripts and guides to setting up a plex media server on a Raspberry Pi.","archived":false,"fork":false,"pushed_at":"2020-05-13T13:18:18.000Z","size":28,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-01T05:00:17.083Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bdevans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-25T14:14:24.000Z","updated_at":"2020-11-23T11:20:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"b643b80c-b53f-4884-b64b-e43aa06e6678","html_url":"https://github.com/bdevans/plexberry","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdevans%2Fplexberry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdevans%2Fplexberry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdevans%2Fplexberry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdevans%2Fplexberry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdevans","download_url":"https://codeload.github.com/bdevans/plexberry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233773444,"owners_count":18728039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T10:48:46.228Z","updated_at":"2025-09-21T16:32:41.869Z","avatar_url":"https://github.com/bdevans.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Plexberry\n=========\n\n[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)\n\nA guide to setting up a plex media server on a Raspberry Pi.\n\nThis is a collection of ideas and notes (largely adapted from [element14.com](https://www.element14.com/community/community/raspberry-pi/raspberrypi_projects/blog/2016/03/11/a-more-powerful-plex-media-server-using-raspberry-pi-3) and [htpcguides.com](https://www.htpcguides.com/install-plex-media-server-raspberry-pi-3-image/)) for installing and configuring plex on a Raspberry Pi 3. Use at your own risk!\n\nThe accompanying script `setup_plex.sh` is designed to install and configure plex on a Raspberry Pi installed with Raspbian.\n\n## Useful commands\n\n* To fully update the system (including firmware):\n\t```\n\tsudo apt-get update \u0026\u0026 sudo apt-get upgrade \u0026\u0026 sudo apt-get dist-upgrade \u0026\u0026 sudo rpi-update\n\tsudo apt-get autoremove \u0026\u0026 sudo apt-get clean \u0026\u0026 sudo reboot\n\t```\n\n* Check attached disks\n\t`lsblk`\n\n* Backup or transfer media with [rsync](https://www.computerhope.com/unix/rsync.htm)\n\t```rsync [options] SOURCE DESTINATION```\n\n* For uploading e.g.:\n\t```rsync -rtvhP ~/Music pi@plexberry.local:/mnt/library/```\n\t\n* Spaces in the folder names:\n\t```rsync -rtvhP ~/TV/Series3 pi@plexberry.local:\"/mnt/library/TV/Arrested\\ Development/\"```\n\n* For backup:\n\t```rsync -avhP /mnt/library user@nas.local:/mnt/backup/```\n\n* Expand SD Filesystem and Overclock\n\t```\n\traspi-config\n\treboot\n\t```\n\n* Optional WiFi tools\n\t```\n\tapt-get install firmware-linux-nonfree wireless-tools wpasupplicant -y\n\t```\n\n## Useful general guides\n* https://www.htpcguides.com/install-plex-media-server-raspberry-pi-3-image/\n* https://pimylifeup.com/raspberry-pi-plex-server/\n* https://www.reddit.com/r/PleX/comments/41z6ff/raspberry_pi2_as_a_pms_tutorial_and_infos_inside/\n* https://www.htpcguides.com/arm-pi-media-server-installer-images-download-page/\n* https://github.com/alexandregz/awesome-raspberrypi/blob/master/README.md\n\n## Building the plex server\n\n### Hardware\n\n* Boards - the guide assumes you are using a Raspberry Pi 3 but here are some others to consider:\n   * Benchamrks and comparison \n\t  - [Benchmarks of nine boards](http://www.phoronix.com/scan.php?page=article\u0026item=raspberry-pi-3\u0026num=1)\n\t  - http://www.makeuseof.com/tag/best-prebuilt-diy-nas-solutions-plex-server/ \n\t  - https://en.wikipedia.org/wiki/Comparison_of_single-board_computers \n\t  - (Passmark \u003e 2000 for 1080p transcoding https://www.cpubenchmark.net) \n\t  - https://beebom.com/best-raspberry-pi-3-alternatives/\n   * [Raspberry Pi 3](https://www.raspberrypi.org/products/#buy-now-modal)\n   * [Rock64](https://www.pine64.org/?page_id=7147)\n   * [ODROID-C2](https://www.odroid.co.uk/odroid-c2-cat/hardkernel-odroid-c2-board)\n   * [ODROID-XU4Q](https://www.odroid.co.uk/index.php?route=product/product\u0026product_id=813)\n   * [Banana Pi M3](http://www.banana-pi.org/m3.html)\n   * [Intel NUC](https://www.intel.co.uk/content/www/uk/en/products/boards-kits/nuc.html)\n   * [nVidia Shield Pro](https://www.nvidia.com/en-us/shield/)\n   * [Orange Pi](http://www.orangepi.org/orangepiplus2/)\n   * [NanoPC-T3](http://www.friendlyarm.com/index.php?route=product/product\u0026path=69\u0026product_id=123)\n   * [PixiePro](https://store.treats4geeks.com/index.php/pixiepro-27.html)\n   * [HummingBoard](https://www.solid-run.com/)\n   * [UDOO x86 Ultra](https://shop.udoo.org/eu/x86/udoo-x86-ultra.html?___from_store=eu\u0026popup=no)\n* SD Cards: http://elinux.org/RPi_SD_cards\n* USB hubs: http://elinux.org/RPi_Powered_USB_Hubs\n\n### Install an OS\n\n* Raspbian (Recommended)\n    - https://www.raspberrypi.org/documentation/installation/installing-images/\n    - e.g. using [macOS](https://www.raspberrypi.org/documentation/installation/installing-images/mac.md)\n    - `diskutil list`\n    - `diskutil unmountDisk /dev/disk2`\n    - `sudo dd bs=1m if=~/Downloads/2016-05-27-raspbian-jessie.img of=/dev/rdisk2`\n\t- Expand SD Filesystem, Overclock and optionally Boot to Desktop\n\t\t```\n\t\traspi-config\n\t\treboot\n\t\t```\n\t- Fully update the system (including firmware):\n\t\t```\n\t\tsudo apt-get update \u0026\u0026 sudo apt-get upgrade \u0026\u0026 sudo apt-get dist-upgrade \u0026\u0026 sudo rpi-update\n\t\tsudo apt-get autoremove \u0026\u0026 sudo apt-get clean \u0026\u0026 sudo reboot\n\t\t```\n\n* Ready-made images\n   - https://github.com/igorpecovnik/Debian-micro-home-server\n   - http://www.htpcguides.com/arm-pi-media-server-installer-images-download-page/\n   - http://www.htpcguides.com/raspberry-pi-2-home-media-server-installer-image/\n\n* Try MINIBIAN for a minimal OS.\n    - http://minibianpi.wordpress.com/\n    - https://sourceforge.net/projects/minibian/\n    - http://www.htpcguides.com/lightweight-raspbian-distro-minibian-initial-setup/\n\t1. Install utilities\n\t\t```\n\t\tapt-get update\n\t\tapt-get install nano sudo rpi-update raspi-config usbutils dosfstools -y\n\t\tapt-get remove initramfs-tools -y\n\t\t```\n\t2. Expand SD Filesystem, Overclock and optionally Boot to Desktop\n\t\t```\n\t\traspi-config\n\t\treboot\n\t\t```\n\t3. Update Raspberry Pi Firmware\n\t\t```\n\t\trpi-update\n\t\treboot\n\t\t```\n\t4. Update the packages and distribution\n\t\t```\n\t\tapt-get upgrade -y\n\t\tapt-get dist-upgrade -y\n\t\t```\n\t5. Optional WiFi tools\n\t\t`apt-get install firmware-linux-nonfree wireless-tools wpasupplicant -y`\n\t6. Add the user\n\t\t```\n\t\tadduser pi\n\t\tusermod -a -G sudo pi\n\t\t```\n\t7. Optional install GUI then enable boot to desktop\n\t\t```\n\t\tsudo apt-get install lxde -y\n\t\tsudo raspi-config\n\t\t```\n\t8. Clean the packages\n\t\t`sudo apt-get clean`\n\t9. Change the password\n\t\t`passwd`\n\n### Setup ssh keys for passwordless login\n* [Guide](https://www.cyberciti.biz/faq/how-to-set-up-ssh-keys-on-linux-unix/) to create and install keys. \n* See also [here](https://www.cyberciti.biz/faq/create-ssh-config-file-on-linux-unix/) for setting up shortcuts (with options) for remote server access. \n\n### Install Plex server\n* Edit then run `setup_plex.sh` (edit for the attached hard disk type)\n* Set static IP address and change hostname\n* [Manual installation (deprecated)](http://www.htpcguides.com/install-plex-media-server-raspberry-pi-2-3-manually/)\n\n### Setup transcoding\n* You should set Plex to use your external hard drive for temporary transcoding data after you have mounted your drives properly.\n* Click the settings icon in the top right, Click Server and then Transcoder in the left pane.\n* Make sure SHOW ADVANCED is enabled underneath Server.\n* Scroll down to Transcoder temporary directory and set your USB external drive’s mount path (e.g. `/mnt/usbstorage` not `/dev/sda1`)\n* Scroll down further and hit Save Changes\n\n### [Mount a harddisk](https://devtidbits.com/2013/03/21/using-usb-external-hard-disk-flash-drives-with-to-your-raspberry-pi/)\n* http://www.htpcguides.com/properly-mount-usb-storage-raspberry-pi/\n* http://www.raspberrypi-spy.co.uk/2014/05/how-to-mount-a-usb-flash-disk-on-the-raspberry-pi/\n* https://devtidbits.com/2013/03/21/using-usb-external-hard-disk-flash-drives-with-to-your-raspberry-pi/\n* https://www.raspberrypi.org/forums/viewtopic.php?t=38429\n   ```\n   dmesg\n   ls -l /dev/disk/by-uuid/\n   sudo blkid\n   sudo fdisk -l\n   cat /proc/mounts\n   ```\n* Test fstab\n   ```\n   sudo mount -a\n   mount_disk.sh sda1 ext4 library\n   ```\n* Get format automatically? library is optional\n* Move cache to external harddisk\n\n* Backup media with `rsync [options] SOURCE DESTINATION`\n   ```rsync -arvhP /mnt/backup/Music /mnt/library/```\n\n### Setup a TV tuner\n* Client\n\t* http://kodi.wiki/view/PVR\n\t* https://linuxtv.org\n\tDVB-T\n\t* https://linuxtv.org/wiki/index.php/DVB-T_USB_Devices\n\t* https://www.raspberrypi.org/forums/viewtopic.php?f=35\u0026t=18838\n\tdmesg | grep dvb-usb\n\t* http://www.hauppauge.co.uk/site/support/support_all.html?prod=30\n* Plex server\n\t* https://forums.plex.tv/discussion/139628/plex-and-tv-tuners\n\t* https://www.reddit.com/r/PleX/comments/2zhap7/plex_and_ota_tuners/\n\t* HDHomerun https://www.silicondust.com/hdhomerun/ using the HDHR View Plugin (requires Plex Pass)\n\t* https://tvheadend.org\n\t\t- https://tvheadend.org/projects/tvheadend/wiki/AptRepository\n\t* http://www.mumudvb.net wget http://www.mumudvb.net/release/mumudvb_2-1_armhf.deb\n\t* https://www.mythtv.org/wiki/Raspberry_Pi\n\t* http://dvblogic.com/en/dvblink/\n\n### Move\na) transcoding cache and\nb) metadata: /var/lib/plexmediaserver/Library/Application\\ Support/Plex\\ Media\\ Server/Metadata/\nto Harddisk before adding folders\n* Click the settings icon in the top right, Click Server and then Transcoder in the left pane.\n* Make sure SHOW ADVANCED is enabled underneath Server.\n* Scroll down to Transcoder temporary directory and set your USB external drive’s mount path (e.g. /mnt/usbstorage not /dev/sda1)\n* Scroll down further and hit Save Changes\n* https://smyl.es/how-to-move-plex-metadata-and-index-data-to-new-driver-andor-directory-location/\n\n### Open http://ip.address:32400/web and add media folders.\nTo manually start the plex server:\n`sudo bash /usr/lib/plexmediaserver/start.sh \u0026`\n\n### Test\nBackup existing images with dd\n* Web player\n* Client player e.g. RasPlex, Kodi, OSMC, LIBREELEC, OpenELEC\n* Script to set up plex client on Kodi\n\t- http://www.htpcbeginner.com/kodi-and-plex-integration-with-plexbmc-addon/\n\t- https://github.com/hippojay/plugin.video.plexbmc/releases\n\n### Build a download hub\nhttp://www.alphr.com/raspberry-pi/raspberry-pi-2/1000043/raspberry-pi-2-18-of-the-best-projects-you-can-try-with-the\n\n### Set up backups\n* Mirror hard disk with scheduled rsync\n* Back up SD card with scheduled dd\n\n### Set DHCP reservation (internal) and configure dynamic dns (external)\n* http://www.htpcguides.com/nag-free-dynamic-dns-raspberry-pi/\n* https://www.dnsdynamic.org/api.php\n\n### [Setup handbrake to automatically transcode files offline](https://github.com/sladebaumann/raspberry-plex)\n* https://www.rapidseedbox.com/kb/beginners-guide-handbrake\n* https://forums.plex.tv/discussion/comment/1335697/#Comment_1335697\n* https://b3n.org/automatic-ripping-machine/\n* https://github.com/mummybot/convert-videos-for-plex\n* https://github.com/mdhiggins/sickbeard_mp4_automator\n\n### [Rip DVDs to Plex](https://www.reddit.com/r/PleX/comments/5l8owa/question_best_practice_for_ripping_owned_dvds_to/)\n* Handbreak (lossy ~1GB)\n* MakeMKV (lossless ~4-8GB)\n\n### Re-rip CDs to FLAC (FFmpeg, lossless audio) \n* Exact Audio Copy https://www.dbpoweramp.com/cd-ripper.htm \n* http://tmkk.undo.jp/xld/index_e.html\n\n### Install HTPC Manager: http://htpc.io/\n* http://www.htpcguides.com/install-htpc-manager-banana-pi-with-bananian/\nSupports:\n   * Kodi\n   * Sick Beard - periodic TV show downloading\n   * SABnzbd - usenet downloading\n   * CouchPotato - feature length video downloading\n   * Transmission - bittorrent client\n   * Python\n* Install\n\t```\n\tsudo apt-get install build-essential git python-imaging python-dev python-setuptools python-pip python-cherrypy vnstat smartmontools -y\n\tsudo pip install psutil\n\tsudo git clone https://github.com/Hellowlol/HTPC-Manager /opt/HTPCManager\n\tsudo chown -R pi:pi /opt/HTPCManager\n\tpython /opt/HTPCManager/Htpc.py --daemon\n\t```\n* Start at boot\n\t```\n\tsudo cp /opt/HTPCManager/initd /etc/init.d/htpcmanager\n\tsudo nano /etc/init.d/htpcmanager\n\t\u003e\u003e APP_PATH=/opt/HTPCManager\n\tsudo chmod +x /etc/init.d/htpcmanager\n\tsudo update-rc.d htpcmanager defaults\n\t```\n* Access: http://ip.address:8085\n\n### Setup Dynamic DNS\n* https://www.duckdns.org/install.jsp\n* https://www.dynu.com/en-US/\n* https://www.duiadns.net/personal-account\n* https://www.clearos.com/products/purchase/clearos-marketplace-apps/cloud/Dynamic_DNS\n\n### Other useful services\n* vsftpd\n* NFS\n* Samba\n* nginx for reverse proxy: http://www.htpcguides.com/?s=reverse+proxy\n\n### [Heatsink for Raspberry Pi](https://www.amazon.co.uk/GorillaPi-Raspberry-aluminium-Significant-Advantage/dp/B01FY9196K)\n\n\nPlex Clients and Supported Media Formats\n========================================\n\nSee [here](https://support.plex.tv/hc/en-us/articles/203810286-What-media-formats-are-supported-) for a list of supported media formats and support from built-in TV clients. \n\nIdeally videos should be **MP4** containers with **H.264** (or H.265) video encoding and **AAC** audio encoding. \n\n* RasPlex\n    - http://www.rasplex.com/get-started/download-rasplex.html\n    - http://www.makeuseof.com/tag/easiest-raspberry-pi-media-centre-rasplex/\n* Kodi\n    - http://mymediaexperience.com/raspberry-pi-xbmc-with-raspbmc/\n    - http://kodi.wiki/view/HOW-TO:Install_Kodi_on_Raspberry_Pi\n    - https://www.raspberrypi.org/forums/viewtopic.php?t=99866\nScript to set up plex client on Kodi\n    - http://www.htpcbeginner.com/kodi-and-plex-integration-with-plexbmc-addon/\n    - https://github.com/hippojay/plugin.video.plexbmc/releases\n* OSMC\n    - https://osmc.tv/about/\n* LIBREELEC\n* OpenELEC\n    - http://www.htpcbeginner.com/openelec-vs-osmc-raspberry-pi/2/\n\nHonourable mentions\n===================\n\nSome other media servers/organisers to consider include:\n* MediaPortal (Includes TV recording, Windows only) http://www.team-mediaportal.com\n* MythTV https://www.mythtv.org (also has a plugin for Kodi)\n* Emby (clone of plex)\n* https://github.com/RasPlex/OpenPHT (Fork of RasPlex)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdevans%2Fplexberry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdevans%2Fplexberry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdevans%2Fplexberry/lists"}