Plex media server (dnla server)
Add the repositories and update (as root)
Command line:
Command line:
wget -O - http://shell.ninthgate.se/packages/shell.ninthgate.se.gpg.key | apt-key add -
echo "deb http://www.deb-multimedia.org jessie main non-free" | tee -a /etc/apt/sources.list.d/deb-multimedia.list
echo "deb http://shell.ninthgate.se/packages/debian jessie main" | tee -a /etc/apt/sources.list.d/plex.list
apt-get update && apt-get install deb-multimedia-keyring -y
Install Plex (as root)
Command line:
Command line:
apt-get install plexmediaserver -y
File system - Transcoding and Library
Create a Transcoding folder and prepare the volume and file system
Configuration file: /etc/fstab
Configuration file: /etc/fstab
# Transcoding disk
/dev/xvdb1 /media/Transcoder ext4 defaults 0 0
Library default location is /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/
Prepare the volume and file system for the library. Then run the commands below to stop plex service, move the Library files to the new volume and mount it.
Command line:
Prepare the volume and file system for the library. Then run the commands below to stop plex service, move the Library files to the new volume and mount it.
Command line:
service plexmediaserver stop
mount /dev/xvdc1 /mnt
mv /var/lib/plexmediaserver/Library /mnt
mount /dev/xvdc1 /var/lib/plexmediaserver/
ls "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/" (check)
umount /mnt
Configuration file: /etc/fstab
# Library
/dev/xvdc1 /var/lib/plexmediaserver/ ext4 defaults 0 0
Plex installs a service plexmediaserver
Command line:
Command line:
service plexmediaserver start
Connect to http://ip.address:32400/manage/index.html or http://ip.address:32400/manage/index.html#!/setup
Login is not required hit the Home button top left
Log file path
/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/
Login is not required hit the Home button top left
Log file path
/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/
SickRage (TV DB)
Setup the enviroment with python 2.7 and git. (as root)
Command line:
Command line:
apt-get install python-pip python-dev git-core libssl-dev libxslt1-dev libxslt1.1 libxml2-dev libxml2 libssl-dev libffi-dev -y
Get Sick Rage from git hub, best performed as the account you want it to run under (user) make sure you have rights as this user to the folder. The exampled below places the server in /opt/sickrage, you will need to be root for this.
Command line:
Command line:
git clone https://github.com/SickRage/SickRage.git /opt/sickrage
Correct permissions with chown if needed. (as root)
Command line:
Command line:
chown user:user /opt/sickrage -R
Test SickRage run the following then connect using a browser http://"Server IP":8081
(as user to run sickrage, permission errors may need to be fixed with chown)
Command line:
(as user to run sickrage, permission errors may need to be fixed with chown)
Command line:
python /opt/sickrage/SickBeard.py -d
Next to launch on boot, in this example we run sickrage service under an account called user. Starting sickrage as a service will depend on the underlying OS, in this example Debian jessie and later (systemd).
(edit as root)
Configuration file: /etc/systemd/system/sickrage.service
(edit as root)
Configuration file: /etc/systemd/system/sickrage.service
[Unit]
Description=SickRage Daemon
[Service]
User=user
Group=user
Type=forking
GuessMainPID=no
ExecStart=/usr/bin/python /opt/sickrage/SickBeard.py -q --daemon --nolaunch --datadir=/opt/sickrage
[Install]
WantedBy=multi-user.target
Enable sickrage service (as root)
Command line:
Command line:
systemctl enable sickrage.service
Start the service (as root)
Command line:
Command line:
service sickrage start
Sickrage is now installed and set to run as a service called sickrage.
Additional configuration points
Additional configuration points
- NFS or drive mountings for library
- Proxy connections to access torrent sites and evade IPS blocks
- Torrent/NBZ server for automation
CouchPotato (Film DB)
Film database application, can download meta data and rename movie files.
Install GIT. (as root)
Command line:
Install GIT. (as root)
Command line:
apt-get install git-core
Make a folder (CouchPotatoServer) and 'cd' to the folder of your choosing for building the install kit, the account you run git with will be granted ownership of the files.
Run Git clone to pull in couchpotato. (as user to run service or root and chown later)
Command line:
Run Git clone to pull in couchpotato. (as user to run service or root and chown later)
Command line:
git clone https://github.com/CouchPotato/CouchPotatoServer.git
Test the server runs permission errors may need chown to fix
(check it runs under the account that imported it/intended to run it)
Command line:
(check it runs under the account that imported it/intended to run it)
Command line:
python CouchPotatoServer/CouchPotato.py
Copy the boot init script over. (as root)
Command line:
Command line:
cp CouchPotatoServer/init/ubuntu /etc/init.d/couchpotato
Check the file is executable! (as root)
Command line:
Command line:
ls -l /etc/init.d/couchpotato
If you need to run. Change the permissions (as root)
Command line:
Command line:
chmod +x /etc/init.d/couchpotato
Add the boot script to the default start up. (as root)
Command line:
Command line:
update-rc.d couchpotato defaults
Setup the default config file. (as root)
Configuration file: /etc/default/couchpotato
Configuration file: /etc/default/couchpotato
# Accepted variables with default values -if any- in parentheses:
# CP_USER # username to run couchpotato under (couchpotato)
# CP_HOME # directory of CouchPotato.py (/opt/couchpotato)
# CP_DATA # directory of couchpotato's db, cache and logs (/var/opt/couchpotato)
# CP_PIDFILE # full path of couchpotato.pid (/var/run/couchpotato/couchpotato.pid)
# PYTHON_BIN # full path of the python binary (/usr/bin/python)
# CP_OPTS # extra cli options for couchpotato, see 'CouchPotato.py --help'
# SSD_OPTS # extra options for start-stop-daemon, see 'man start-stop-daemon'
#To build server in home directory of a user called user...
CP_HOME=/home/user/CouchPotatoServer
CP_USER=user
CP_PIDFILE=/home/user/CouchPotatoServer/.couchpotato.pid
CP_DATA=/home/user/CouchPotatoServer
Check permissions on the following the account used to run Couch Potato needs access to the server files made by git and the default config file. (as root)
Command line:
Command line:
chown root:user /etc/default/couchpotato
chown user:user ./CouchPotatoServer/ -R
Access Via http://"servername/IP":5050/
Final points of configuration to consider
Final points of configuration to consider
- Connecting NFS/Drives for Library
- Proxy configurations for evading IPS blocks
- Connecting Torrent/NBZ services for automated downloading
NFS (server & client)
Server
Install
Command line:
Command line:
apt-get install nfs-kernel-server
Configuration file: /etc/exports
/local_folder IPorHOST(rw,sync)
Service control
Command line:
Command line:
service nfs-kernel-server start/stop/restart
Client
Installation
Command line:
Command line:
apt-get install nfs-common -y
Mount NFS shares at boot with fstab
Configuration file: /etc/fstab
Configuration file: /etc/fstab
172.16.1.63:/JBOD_5K3TB_2/Animated /media/ReadyNAS03/Animated nfs auto,bg,intr,hard,rw 0 0
http://www.server-world.info/en/note?os=Debian_8&p=nfs
https://wiki.debian.org/NFSServerSetup
https://www.howtoforge.com/install_nfs_server_and_client_on_debian_wheezy
https://wiki.debian.org/NFSServerSetup
https://www.howtoforge.com/install_nfs_server_and_client_on_debian_wheezy
Transmission (torrent)
Headless Transmission installation
Command line:
Command line:
apt-get install transmission-common transmission-daemon transmission-cli
Edit config file, make sure the service is not running! If the service is running it will overwrite the changes on shutdown.
The following needs to be configured as a minimum to get defaults working. Full example config at bottom of the page can be used to replace this file.
To get access to the web console, which is restricted by default to local host only. White listing is enabled by default for RPC connections find the line rpc-whitelist and rpc-whitelist-enable in settings.json need to be edited.
Any files created will be under the service account only. Edit the Umask line to set the permissions on the files created by transmission to 777. Default is 18, 2 can be used for slightly restricted access.
Configuration file: /etc/transmission-daemon/settings.json
The following needs to be configured as a minimum to get defaults working. Full example config at bottom of the page can be used to replace this file.
To get access to the web console, which is restricted by default to local host only. White listing is enabled by default for RPC connections find the line rpc-whitelist and rpc-whitelist-enable in settings.json need to be edited.
Any files created will be under the service account only. Edit the Umask line to set the permissions on the files created by transmission to 777. Default is 18, 2 can be used for slightly restricted access.
Configuration file: /etc/transmission-daemon/settings.json
"rpc-whitelist": "",
"rpc-whitelist-enabled": false,
"umask": 0,
Download space need to be considered, ideally a local drive with a dedicated partition. File system access can be an issue with the default account as it is not in the users group so will not have access to /media for example.
Example, create a partition on xvdb, format it as ext4 make Torrent folder and mount the drive. Create sub folders for downloaded and incomplete, set group permissions across the folders. Finish with adding the mount point to the fstab to preserve settings.
Command line:
Example, create a partition on xvdb, format it as ext4 make Torrent folder and mount the drive. Create sub folders for downloaded and incomplete, set group permissions across the folders. Finish with adding the mount point to the fstab to preserve settings.
Command line:
fdisk /dev/xvdb
mkfs.ext4 /dev/xvdb1
mkdir /Torrent/
mount /dev/xvdb1 /Torrent
mkdir /Torrent/downloaded
mkdir /Torrent/incomplete
Mount the torrent folder on boot with fstab
Configuration file: /etc/fstab
Configuration file: /etc/fstab
##Torrent data disk
/dev/xvdb1 /Torrent ext4 user,auto 0 0
Set the debian-transmission group permissions to the download folder
Command line:
Command line:
chgrp -R debian-transmission /Torrent
Add user to the debian-transmission group to enable user account access
usermod -a -G debian-transmission user
Connect to the web console @ http://IPADDRESS:9091
DEFAULT USERNAME AND PASSWORD - transmission : transmission
Addition configuration points,
Download space, create and mount a disk for transmission to pool the downloads.
SICKRAGE recommend splitting Incomplete and completed downloads, this can be done using the settings.json file. Moving large files between disks will cause IO, moving between folders on the same drive will not.
Will downloads need to be remotely accessed? Export the folder using NFS or SAMBA. Webmin could also be installed for additional administration tools, should the server be used as a NAS/media server.
Settings.json manual https://trac.transmissionbt.com/wiki/ConfigurationParameters
Guides
http://www.htpcbeginner.com/install-transmission-web-interface-on-ubuntu-1204/
http://www.webupd8.org/2009/12/setting-up-transmission-remote-gui-in.html
https://help.ubuntu.com/community/TransmissionHowTo
The below sets username and password set as transmission transmission. Folder for downloads is /Torrent with downloaded and incomplete folders. umask is set to 0 enabling all users access to files. Webconsole port 9091
Configuration file: /etc/transmission-daemon/settings.json
DEFAULT USERNAME AND PASSWORD - transmission : transmission
Addition configuration points,
Download space, create and mount a disk for transmission to pool the downloads.
SICKRAGE recommend splitting Incomplete and completed downloads, this can be done using the settings.json file. Moving large files between disks will cause IO, moving between folders on the same drive will not.
Will downloads need to be remotely accessed? Export the folder using NFS or SAMBA. Webmin could also be installed for additional administration tools, should the server be used as a NAS/media server.
Settings.json manual https://trac.transmissionbt.com/wiki/ConfigurationParameters
Guides
http://www.htpcbeginner.com/install-transmission-web-interface-on-ubuntu-1204/
http://www.webupd8.org/2009/12/setting-up-transmission-remote-gui-in.html
https://help.ubuntu.com/community/TransmissionHowTo
The below sets username and password set as transmission transmission. Folder for downloads is /Torrent with downloaded and incomplete folders. umask is set to 0 enabling all users access to files. Webconsole port 9091
Configuration file: /etc/transmission-daemon/settings.json
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 4,
"dht-enabled": true,
"download-dir": "/Torrent/downloaded",
"download-limit": 100,
"download-limit-enabled": 0,
"download-queue-enabled": true,
"download-queue-size": 10,
"encryption": 2,
"idle-seeding-limit": 0,
"idle-seeding-limit-enabled": true,
"incomplete-dir": "/Torrent/incomplete",
"incomplete-dir-enabled": true,
"lpd-enabled": false,
"max-peers-global": 200,
"message-level": 1,
"peer-congestion-algorithm": "",
"peer-id-ttl-hours": 6,
"peer-limit-global": 200,
"peer-limit-per-torrent": 50,
"peer-port": 63640,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": true,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": false,
"preallocation": 1,
"prefetch-enabled": 1,
"proxy": "URL OR IP",
"proxy-auth-enabled": false,
"proxy-auth-password": "",
"proxy-auth-username": "",
"proxy-enabled": false,
"proxy-port": "PORT#",
"proxy-type": 2,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 0,
"ratio-limit-enabled": true,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "transmission",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "transmission",
"rpc-whitelist": "",
"rpc-whitelist-enabled": false,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 100,
"speed-limit-down-enabled": false,
"speed-limit-up": 0,
"speed-limit-up-enabled": true,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 0,
"upload-limit": 100,
"upload-limit-enabled": 0,
"upload-slots-per-torrent": 0,
"utp-enabled": true
}