Linux · 1月 21, 2023 0

How to install Sonarr Radarr and Jackett with Docker

内容纲要

Sonarr, Radarr and Jackett serve as a nice example for anyone wishing to learn Docker.

Sonarr,Radarr and Jackett need access to the folder where the media files are.This post will use Samba shares to a Synology NAS as an example.This step can be ignored if the media files are in the same host etc.

Install cifs-utils in the Alpine VM.

sudo apk add cifs-utils

Make the netmount service start on boot:

sudo rc-update add netmount boot

As root create a file that contains the credentials.

su root
vi ~/.smbcr
username=nas-user
password=nas-password

Change the rights of the file so that it can only be read by root:

chmod 600 ~/.smbcr

Find the gid of the user that will run docker:

id dockeras

Edit the fstab file to be mounted:

vi /etc/fstab
//192.168.1.10/Synology1 /mnt/synomovies cifs uid=1000,gid=150,credentials=/root/.smbcr,_netdev,vers=2.0 0 0
//192.168.1.10/Synology2 /mnt/downloads cifs uid=1000,gid=150,credentials=/root/.smbcr,_netdev,vers=2.0 0 0
//192.168.1.10/Synology2 /mnt/tv cifs uid=1000,gid=150,credentials=/root/.smbcr,_netdev,vers=2.0 0 0

Exit root shell and create the directories.

exit
sudo mkdir -p /mnt/downloads /mnt/synomovies /mnt/tv

Make them by the accessible user.

sudo chown -R dockeras:docker /mnt/downloads
sudo chown -R dockeras:docker /mnt/synomovies
sudo chown -R dockeras:docker /mnt/tv

Reloads confirm and confirm that the Alpine host has access to the shares :

sudo mount -a
df -h

Radarr:

docker run -d \
--name=radarr \
--restart=unless-stopped \
-v /home/dockeras/radarr:/config \
-v /mnt/downloads:/downloads \
-v /mnt/synomovies:/movies \
-e TZ='Europe/Athens' \
-e PGID=150 -e PUID=1000 \
-p 7878:7878 \
linuxserver/radarr

Configuration explanation :

give it the name radarr.

Define restart policy.

Map the /config directory inside the container with the /path-to/radarr directory in the host system.

Map the /downloads dir to the path where our download client stores its downloads.

Map the /movies internal dir to the path where our movies are.

Container id and group id.

Map the port of the container to an available port on the host.

The web interface of Radarr can be accessed on ip:7878.

Sonarr:

docker run -d \
--name=sonarr \
--restart=unless-stopped \
-p 8989:8989 \
-e PGID=150 -e PUID=1000 \
-e TZ='Europe/Athens' \
-v /home/dockeras/sonarr:/config \
-v /mnt/downloads:/downloads \
-v /mnt/downloads:/tv \
linuxserver/sonarr

The Sonarr container needs to know specifically where is the host directory for downloaded files.

The web interface of Sonarr can be accessed onip:8989.

Jackett:

docker run -d \
--restart=unless-stopped \
--name=jackett \
-v /home/dockeras/jackett:/config \
-e PGID=150 -e PUID=1000 \
-e TZ='Europe/Athens' \
-p 9117:9117 \
linuxserver/jackett

The web interface of Jackett is ip:9117.

Check the names of active containers:

docker ps -a

Stop the container we want updated by name.

docker stop sonarr
docker rm sonarr

Run the container again.

Optionally remove older image to free up space:

docker images

docker sonarr install

Delete the image with tag , define it with the first 4 digits.

docker rmi 3395

Essential web interface setup

The most common settings in web interface that need attention are :

docker sonarr install

Disable auto update in Jackett.Update by removing the container and running the container again.

In case our download folder is in a different machine we need to add remote path mappings.

%d 博主赞过: