Skip to content

Instantly share code, notes, and snippets.

@jaredhoward
Last active March 18, 2017 01:33
Show Gist options
  • Save jaredhoward/b6f472c8b41c8d34ef5e to your computer and use it in GitHub Desktop.
Save jaredhoward/b6f472c8b41c8d34ef5e to your computer and use it in GitHub Desktop.

Raspberry Pi - Full Media Server

Look into this: http://www.htpcguides.com/raspberry-pi-2-home-media-server-installer-image/

Notes

Install Raspbian

https://www.raspberrypi.org/documentation/installation/installing-images/

Raspberry Pi Configuration

sudo raspi-config

WiFi (if needed)

http://www.howtogeek.com/167425/how-to-setup-wi-fi-on-your-raspberry-pi-via-the-command-line/ https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

Mount network drive

I use a NAS to store all my media.

  • Check to see if cifs-utils is installed.
dpkg -s cifs-utils
  • Install, if needed
sudo apt-get install cifs-utils
  • Make folder for mount
sudo mkdir -p /mnt/nas
  • Edit /etc/fstab and enter something like:
//10.0.1.11/Volume_1 /mnt/nas cifs guest,uid=1000,gid=1000,iocharset=utf8 0 0
  • Mount
sudo mount -a

Mounting tutorial: (http://geeks.noeit.com/mount-an-smb-network-drive-on-raspberry-pi/)

Installing unrar

(https://www.raspberrypi.org/forums/viewtopic.php?p=151313)

  • Modify /etc/apt/sources.list to include the last line with deb-src
  • Build package
sudo apt-get build-dep unrar-nonfree
sudo apt-get source -b unrar-nonfree
sudo dpkg -i unrar_X.X.X...._armhf.deb

Install libssl and libcrypto

Attempting to install libtorrent fails requiring libcrypto.

sudo apt-get install libssl-dev

Installing Plex Server

http://www.htpcguides.com/install-plex-media-server-on-raspberry-pi-2/

Everything guide

https://github.com/xombiemp/ultimate-torrent-setup/wiki

Installing rtorrent

https://github.com/Kerwood/Rtorrent-Auto-Install

  • Run Kerwood's Installation instructions
    • Set Pi's user, login user and password
    • Install all plugins: #47
    • Install rtorrent
  • Edit ~/.rtorrent.rc for correct download directory
  • Edit /var/www/html/rutorrent/conf/config.php
    • $topDirectory = /mnt/nas/data/;
    • $saveUploadedTorrents = false;
  • Edit /var/www/html/rutorrent/plugins/autotools/conf.php
    • $autowatch_interval = 60;
  • Restart rtorrent sudo systemctl restart rtorrent.service
  • Access GUI by http://IP/rutorrent/
  • Use setting from https://github.com/xombiemp/ultimate-torrent-setup/wiki#configure-the-gui-settings

Installing Deluge

http://www.howtogeek.com/142044/how-to-turn-a-raspberry-pi-into-an-always-on-bittorrent-box/

Installing Sonarr

http://www.htpcguides.com/install-sonarr-raspberry-pi-mono-310/

Installing Couchpotato

http://www.htpcguides.com/install-couchpotato-raspberry-pi-raspbian/

Headphones

http://www.htpcguides.com/install-headphones-raspberry-pi-usenet-music/

  • Modify /opt/headphones/config.ini
http_host = "0.0.0.0"

HTTP Access

Nginx

Use Nginx as a reverse proxy to the applications. example to review managethis

location /sonarr/ {
  proxy_pass                            http://192.168.1.201:8081; #Point this towards your Sonarr install
  proxy_set_header Host                 $host;
  proxy_set_header X-Real-IP            $remote_addr;
  proxy_set_header X-Forwarded-For      $proxy_add_x_forwarded_for;
  proxy_set_header X-Forwarded-Scheme   $scheme;
}
  • Authentication. For authentication for everything inside Nginx, set directly within the server block.
server {
  ...
  auth_basic "Restricted Content";
  auth_basic_user_file /etc/nginx/.htpasswd;
  • A block similar to this will allow local requests but require public requests to authenticate.
location /files {
  satisfy any;
  allow 10.1.0.0/24;
  deny all;
  auth_basic "Authentication Required";
  auth_basic_user_file /etc/access_list;
  proxy_pass http://127.0.0.1:3000/;
}

HTPC's Image

Install

http://www.htpcguides.com/raspberry-pi-2-home-media-server-installer-image/

Mounting NAS drive

  • Update for cifs support:
sudo rpi-update
sudo reboot

Transmission

WebUI: http://ip.address:9091

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment