Top Ticker

6/recent/ticker-posts

Home Media Center (Fully Automated)

Do you want a media center in your home environment which can be accessed from any device in your home to experience full entertainment solution

Then this blog is for you

Go through the whole guide to setup a media center in your home which is fully automated (searching, downloading via torrents) and made available on your media server for your home users.

Steps which needs to be done

  1. OS 
  2. Media Server
  3. Media Management (Movies, TV Shows etc)
  4. Torrent Setup
  5. Torrents Management

After all this setup, you just need to add a TV Show or Movie, and it will automatically download it when it becomes available via torrent, a movie or episode of tv show


 

STEP 1

OS Installation and setup

For this tutorial i will use ubuntu 20.04 LTS as OS, you can also use windows OS if you like but i prefer linux due to performance and less viruses issue

Install Ubuntu 20.04 LTS  as you would install any other OS

Update the repo and then upgrade ubuntu

sudo apt update

sudo apt upgrade

I recommend that for media use separate hard drive and formatted as ntfs so if OS got corrupted you can attached this drive to any windows machine to access the data 

for the sake of this tutorial i attached a 10GB drive formatted as ntfs

verify and setup the IP address

ip a

sudo nano /etc/netplan/00-installer-config.yaml

the netplan config file might be different for you edit the config file accordingly

sudo netplan apply

Prepare the directory for media

verify the drive which we attached for data

sudo fdisk -l

in my case it is  /dev/sdb1

mount the device drive into the linux file system first create a directory where we mount the drive

mkdir 10gb

check the mounted filesystem

df -h

OUTPUT

Filesystem Size Used Avail Use% Mounted on
udev 938M 0 938M 0% /dev
tmpfs 196M 1.3M 195M 1% /run
/dev/sda2 20G 5.1G 14G 28% /
tmpfs 980M 0 980M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 980M 0 980M 0% /sys/fs/cgroup
/dev/loop0 55M 55M 0 100% /snap/core18/1705
/dev/loop1 56M 56M 0 100% /snap/core18/1885
/dev/loop2 69M 69M 0 100% /snap/lxd/17497
/dev/loop3 30M 30M 0 100% /snap/snapd/8790
/dev/loop4 31M 31M 0 100% /snap/snapd/9279
/dev/loop5 71M 71M 0 100% /snap/lxd/16926
tmpfs 196M 0 196M 0% /run/user/1000

as you can see our device drive isn't mounted yet so mount it

sudo mount /dev/sdb1 /home/serveradmin/10gb

df -h

now our drive mounted on the directory which we created earlier in home directory

Filesystem Size Used Avail Use% Mounted on
udev 938M 0 938M 0% /dev
tmpfs 196M 1.3M 195M 1% /run
/dev/sda2 20G 5.1G 14G 28% /
tmpfs 980M 0 980M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 980M 0 980M 0% /sys/fs/cgroup
/dev/loop0 55M 55M 0 100% /snap/core18/1705
/dev/loop1 56M 56M 0 100% /snap/core18/1885
/dev/loop2 69M 69M 0 100% /snap/lxd/17497
/dev/loop3 30M 30M 0 100% /snap/snapd/8790

/dev/loop4 31M 31M 0 100% /snap/snapd/9279

/dev/loop5 71M 71M 0 100% /snap/lxd/16926

tmpfs 196M 0 196M 0% /run/user/1000

/dev/sdb1 10G 52M 10G 1% /home/serveradmin/10gb

 

this is a temporary mounted if you reboot the system it will revert back to unmounted state so to mount it permanently add this entry in fstab config file

edit the fstab config file

sudo nano /etc/fstab

the add this line 

/dev/sdb1       /home/serveradmin/10gb    ntfs    defaults        0       0

now reboot the system to check if upon restart it mounted properly or not

df -h

OUTPUT

Filesystem Size Used Avail Use% Mounted on
udev 938M 0 938M 0% /dev
tmpfs 196M 1.3M 195M 1% /run
/dev/sda2 20G 5.1G 14G 28% /
tmpfs 980M 0 980M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 980M 0 980M 0% /sys/fs/cgroup
/dev/sdb1 10G 52M 10G 1% /home/serveradmin/10gb
/dev/loop0 55M 55M 0 100% /snap/core18/1705
/dev/loop1 56M 56M 0 100% /snap/core18/1885
/dev/loop3 71M 71M 0 100% /snap/lxd/16926
/dev/loop2 69M 69M 0 100% /snap/lxd/17497
/dev/loop4 30M 30M 0 100% /snap/snapd/8790
/dev/loop5 31M 31M 0 100% /snap/snapd/9279
tmpfs 196M 0 196M 0% /run/user/1000

as you can see it is mounted successfully

After OS installation and drive device setup now move on to next step

STEP 2

Media server installation

There are few different option for media server like PLEX, EMBY or JELLYFIN a fork of emby, but i am going to install emby server because there are few option which i would like to have

Install Emby Server

Download the latest emby server from https://emby.media/linux-server.html via wget

wget  https://github.com/MediaBrowser/Emby.Releases/releases/download/4.5.1.0/emby-server-deb_4.5.1.0_amd64.deb

install emby server

sudo dpkg -i emby-server-deb_4.5.1.0_amd64.deb

after installation start browser and open url http://IP-Address:8096 , and start graphical installation of media server

Create user, first user by default is admin user, next setup media library or you can skip to configure later, go through the rest of the setup and configure accordingly, now emby server is installed and configured


 STEP 3

Media Management

To automate the media downloading we need 2 programs which need to be install, one for Movies and one for TV Shows

For Movies we need to install radarr (https://radarr.video/)

Radarr is a movie collection manager for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new movies and will interface with clients and indexers to grab, sort, and rename them. It can also be configured to automatically upgrade the quality of existing files in the library when a better quality format becomes available

For TV Shows we need to install sonarr (https://sonarr.tv/)

It does the same as radarr but only for TV Shows

Install Radarr

Install dependencies 

Update to the latest version of Mono

Add mono repo

sudo apt install gnupg ca-certificates

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update

Install Mono

sudo apt install mono-complete 

sudo apt install  mediainfo

Install Radarr

Download and extract the latest release from GitHub, changing the URL below to match

wget https://github.com/Radarr/Radarr/releases/download/v0.2.0.1504/Radarr.develop.0.2.0.1504.linux.tar.gz

tar -zxvf Radarr.develop.0.2.0.1504.linux.tar.gz

mv Radarr /opt

To run Radarr on startup create a service file and enable on startup

sudo nano /etc/systemd/system/radarr.service

and add this code to this file, change user and group according to your configuration

[Unit]
Description=Radarr Daemon
After=syslog.target network.target

[Service]
# Change the user and group variables here.
User=radarr
Group=radarr

Type=simple

# Change the path to Radarr or mono here if it is in a different location for you.
ExecStart=/usr/bin/mono --debug /opt/Radarr/Radarr.exe -nobrowser
TimeoutStopSec=20
KillMode=process
Restart=on-failure

# These lines optionally isolate (sandbox) Radarr from the rest of the system.
# Make sure to add any paths it might use to the list below (space-separated).
#ReadWritePaths=/opt/Radarr /path/to/movies/folder
#ProtectSystem=strict
#PrivateDevices=true
#ProtectHome=true

[Install]
WantedBy=multi-user.target

Enable and Start Radarr Service

sudo systemctl enable radarr.service

sudo systemctl start radarr.service

verify that is this service running?

sudo systemctl status radarr.service

Now fireup the browser and open url http://IP-Address:7878 and you should see radarr web interface


 

Install Sonarr

A modern version of Mono is required, which is already install during radarr installation

Add Sonarr's repository to your software source

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493

echo "deb http://apt.sonarr.tv/ master main" | sudo tee /etc/apt/sources.list.d/sonarr.list

Install/Update Sonarr

sudo apt update

sudo apt install nzbdrone

Start Sonarr

mono --debug /opt/NzbDrone/NzbDrone.exe

To run Sonarr on startup create a service file and enable on startup

sudo nano /etc/systemd/system/sonarr.service

and add this code to this file, change user and group according to your configuration

[Unit]
Description=Sonarr Daemon
After=network.target

[Service]
# Change and/or create the required user and group.
User=sonarr
Group=sonarr

# The UMask parameter controls the permissions of folders and files created.
#UMask=002

# The -data=/path argument can be used to force the config/db folder
ExecStart=/usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe -nobrowser

Type=simple
TimeoutStopSec=20
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target

 

Enable and start Sonarr

sudo systemctl enable --now sonarr.service

Check status of Sonarr

sudo systemctl status sonarr.service

Open your browser and go to url http://IP-Address:8989/ you should see Sonarr web interface its mean you successfully install Sonarr



 STEP 4

To setup torrent, we need to install any torrent client with webui, I am going to install transmission torrent client

Install Transmission

sudo apt-get install transmission-cli transmission-common transmission-daemon

Configure Users and Permissions

create a directory for Transmission to use, we will create it in our attached ntfs drive

mkdir /home/serveradmin/10gb/transmission/

cd /home/serveradmin/10gb/transmission/

mkdir completed incompleted torrents

add user to the transmission group

sudo usermod -a -G debian-transmission serveradmin

change the ownership of the Transmission download folders to the group

change the permissions for the transmission download folders

sudo chmod -R 775 /home/serveradmin/10gb/transmission

sudo service transmission-daemon start

sudo service transmission-daemon stop

Move Default Settings File

cd /etc/transmission-daemon

sudo cp -a settings.json settings.json.default

create a transmission settings directory in your home folder

mkdir /home/serveradmin/.config/transmission-daemon

sudo cp -a /etc/transmission-daemon/settings.json /home/serveradmin/.config/transmission-daemon/ 

sudo chgrp -R debian-transmission /home/serveradmin/.config/transmission-daemon

sudo chmod -R 770 /home/serveradmin/.config/transmission-daemon

create a symbolic link and edit permissions

cd /etc/transmission-daemon

sudo rm settings.json

sudo ln -s /home/serveradmin/.config/transmission-daemon/settings.json settings.json

sudo chgrp -R debian-transmission /etc/transmission-daemon/settings.json

sudo chmod -R 770 /etc/transmission-daemon/settings.json

Edit Transmission Configuration File

sudo nano setting.json

set at least the following

"download-dir": "/path/to/downloads/folder",
...
"incomplete-dir": "/path/to/incomplete/folder",
"incomplete-dir-enabled": true,

 "rpc-whitelist-enabled": false, (to allow access from any IP)

The default rpc-username and password is "transmission".

reload transmission-daemon to apply the new settings.

start your browser and open url http://IP-Address:9091 if you done everything right you should see transmission webui


 


STEP 5

Torrents Management

For searching torrent sites and downloading torrent, we need another software " Jackett " 

Jackett works as a proxy server: it translates queries from apps into tracker-site-specific http queries and performing searches.

On most operating systems all the required dependencies will already be present. In case they are not, you can refer to this page https://github.com/dotnet/core/blob/master/Documentation/linux-prereqs.md

Download and extract the latest release from github

wget https://github.com/Jackett/Jackett/releases/download/v0.16.1549/Jackett.Binaries.LinuxAMDx64.tar.gz 

tar -zxvf Jackett.Binaries.LinuxAMDx64.tar.gz

move Jackett to /opt

sudo mv Jackett /opt/

Install as service

cd /opt/Jackett

sudo ./install_service_systemd.sh

check jackett service status

systemctl status jackett.service

Now open your browser and goto url http://IP-Address:9117 and you should see Jackett web interface


 The Installation part of this whole setup is complete, in my next post i will show you how to configure all these to work togather and automate the whole process

I hope you like this blog, Please do comment and let me know your opion and suggestions


Post a Comment

3 Comments

  1. Very nice and useful video to learn such new things eagerly waiting for the post

    ReplyDelete
  2. Home Media Center (Fully Automated) >>>>> Download Now

    >>>>> Download Full

    Home Media Center (Fully Automated) >>>>> Download LINK

    >>>>> Download Now

    Home Media Center (Fully Automated) >>>>> Download Full

    >>>>> Download LINK za

    ReplyDelete