This is an old revision of the document!
Uses Swizzin to setup a media server with Plex and various downloaders
First, install a minimal installation of Debian 10 with the following changes:
Swizzin Media ServerOptiplex-Media-Swizzin64-bit PC netinst iso file from debian.orgCreate/Register VM:Create a new virtual machineLinux and Debian GNU/Linux <xx> (64-bit)Target DatastoreCPU:Add other device > NVMe controllerHard Disk 1 > Controller location > NVMe controller 0SCSI controller 0VM Options > Boot Options > Enable Force BIOS setupFinishHost > Manage > System > Autostart:EnableStart earlier and Start later to set the desired orderVirtual Machines on the sidebar and click on the current VMHardware Configuration > Network adapter 1) and desired hostnameroot to disable root login and setup sudoSSH server and Standard system utilities# Install VMWare tools if not already sudo apt install open-vm-tools # Change the SSH port to 50001: sudo sed -i "s/#Port 22/Port 50001/" /etc/ssh/sshd_config # Optionally enable root SSH login sudo sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/" /etc/ssh/sshd_config # Optionally set the timezone to UTC: timedatectl set-timezone UTC exit
Minimal server installation of Debian <xx> Ports: 50001/tcp SSH
Base Installuserdel -r <username>bash <(wget -qO - git.io/swizzin) && . ~/.bashrc
: Make sure the list is correct, and possibly add moreshutdown 0Swizzin installedmedia.domain.com to https://Optiplex-Media-Swizzindeluge in the root of the Downloads shareMedia and using a randomly generated passwordDownloads, Music, and VideoMedia useroptiples-media-swizzin:50001 using the admin account created with Swizzin and run the following:sudo apt install cifs-utils # Setup mount points mkdir /mnt/Music /mnt/Video chmod 777 /mnt/Music /mnt/Video rm -r /home/derek/torrents/deluge # Check using ls -a for hidden files first # Using this command, add the following lines to fstab: sudo nano /etc/fstab # Lines to add (replace the password): //FileServer/Downloads /home/derek/torrents cifs user=Media,password=<password>,x-systemd.automount,rw,dir_mode=0777,file_mode=0777,uid=1000,gid=1000 0 0 //FileServer/Music /mnt/Music cifs user=Media,password=<password>,x-systemd.automount,rw,dir_mode=0777,file_mode=0777,uid=1000,gid=1000 0 0 //FileServer/Video /mnt/Video cifs user=Media,password=<password>,x-systemd.automount,rw,dir_mode=0777,file_mode=0777,uid=1000,gid=1000 0 0 # Allow CIFS mounts to show in the panel admin page # Using this command, change the ''get_mounts()'' function to match the function below sudo -u swizzin nano /opt/swizzin/core/util.py # Restart sudo reboot
The resulting get_mounts() function (added the two lines between the octothorpes):
def get_mounts(): mounts = [] with open("/proc/mounts") as mount: for line in mount: fields = line.strip().split() if fields[0].startswith("/dev"): if ("boot" in fields[1]) or ("fuse" in fields) or ("/snap/" in fields[1]) or ("/loop" in fields[0]): continue else: mounts.append(fields[1]) ### elif fields[0].startswith("//"): mounts.append(fields[1]) ### with open("/etc/fstab") as fstab: for line in fstab: fields = line.strip().split() if "bind" in str(fields): try: mounts.remove(fields[1]) except: pass return mounts
https://media.domain.comDeluge from the sidebar:
: Deluge Setup (Proxy?)
: Add https://github.com/stefantalpalaru/deluge-default-trackers (Requires using local client)Jackett from the sidebar:Sonarr from the sidebar:Settings:Show AdvancedMedia Management:Rename EpisodesSeason Folder Format: Season {season:00}Specials Folder Format: Season 00Multi-Episode Style: RangeUse Hardlinks Instead of CopyImport Extra Files, keeping just srt enabled
: Set Root Folders —————————————————————-Save Changes
: Profiles and Quality (HEVC/1Mbps and things)Indexers:http://localhost:9117Download Clients:Name: DelugeHost: localhostPort: The Deluge Web Port saved from earlierPassword: Your Swizzin passwordConnect:
: maybe setup notifications?UI:First Day of Week: MondayWeek Column Header: Tue 25/03Short Date Format: 25/03/2014Long Date Format: Tuesday, 25 March, 2014Time Format: 17:00/17:30Save ChangesRadarr in the sidebar:Settings:Show AdvancedMedia Management:Rename MoviesStandard Movie FormatUse Hardlinks Instead of CopyImport Extra Files, keeping just srt enabledUnmonitor Deleted Movies
: Set Root Folders —————————————————————-Save ChangesCustom Formats > Add new custom format > Import > Paste the custom format import string from belowProfiles:Any profile:HEVC custom format score to 50
: Profiles and Quality (HEVC/1Mbps and things)Indexers:Jackett preset of Torznab, changing the name, replacing YOURINDEXER with the name used in Jackett, the API Key from Jackett, and setting appropriate categoriesAvailability Delay: 3 DaysRestriction with a Must Not Contain of 3dDownload Clients:Name: DelugeHost: localhostPort: The Deluge Web Port saved from earlierPassword: Your Swizzin passwordConnect:
: maybe setup notifications?UI:First Day of Week: MondayWeek Column Header: Tue 25/03Short Date Format: 25/03/2014Long Date Format: Tuesday, 25 March, 2014Time Format: 17:00/17:30Save ChangesLidarr in the sidebar:Settings:Show AdvancedMedia Management:Rename TracksStandard Track Format: {track:00} {Track Title}Multi Disc Track Format: {medium:0}-{track:00} {Track Title}Album Folder Format: {Album Title}Use Hardlinks Instead of Copy
: Set Root Folders —————————————————————-Save Changes
: Profiles and QualityIndexers:http://localhost:9117Download Clients:Name: DelugeHost: localhostPort: The Deluge Web Port saved from earlierPassword: Your Swizzin passwordConnect:
: maybe setup notifications?UI:First Day of Week: MondayWeek Column Header: Tue 25/03Short Date Format: 25/03/2014Long Date Format: Tuesday, 25 March, 2014Time Format: 17:00/17:30Save ChangesPlex in the sidebar:
: Plex Setup?Configured
: Figure out Lidarr process
Set up Remote Torrent Adder (Github) for Chrome:
Add Server:Name: DelugeServer type: Deluge WebUIHost: <media.domain.com>Port: 443Enable SSLUsername: Your Swizzin usernamePassword: Your Swizzin passwordRelative Path: /deluge
: Write update process and add to update page using {{page>esxi:media_server#Update}}
sudo apt update sudo apt upgrade sudo reboot # If desired/needed
Folder format:
~
torrents (mapped to //fileserver/Downloads)
deluge (Deluge target)
Music (symlink on smb server)
Add to Music
Lidarr (Lidarr target)
Videos (symlink on smb server)
Movies (Radarr target)
TV Shows (Sonarr target)
/mnt
Music (//fileserver/Music)
iTunes
iTunes Media (Plex Library)
Video (//fileserver/Video)
Movies (Plex Library)
TV Shows (Plex Library)
Alternatives: