Installing Docker, Docker-Compose, Samba, Homebridge and Plex.
Install Docker and Docker-Compose
- SSH to Raspberry Pi
ssh pi@raspberry.local
- Configure localization
sudo raspi-config
- Update and upgrade the OS
sudo apt-get update && sudo apt-get upgrade -y
- Download and install Docker
curl -fsSL https://get.docker.com | sh
- Add user to the docker group
sudo usermod -aG docker ${USER}
- Check if the user was added on the docker group
groups ${USER}
- Start Docker at startup
sudo systemctl enable docker
- Reboot
sudo reboot
- Install Docker-Compose
sudo apt-get install libffi-dev libssl-dev
sudo apt install python3-dev
sudo apt-get install -y python3 python3-pip
sudo pip3 install docker-compose
- Check if Docker works
docker run hello-world
Mount disk
Mounting manually
-
Connect the drive
-
Create the directory where to mount the disk on
/mnt/
. For exampleAlanDoozTV
sudo mkdir /mnt/AlanDoozTV
- Find the name of the external disk, for example
/dev/sda2
sudo fdisk -l
- Mount drive to folder previously created
sudo mount /dev/sda2 /mnt/AlanDoozTV
- Verify it was successfully mounted by listing the content of the drive
ls /mnt/AlanDoozTV
- To unmount the storage device
sudo umount /mnt/AlanDoozTV
Mounting automatically
- Find the UUID of the disk partition
sudo blkid
- Modify the
fstab
file to define where storage devices will be automatically mounted when the Raspberry Pi boots
sudo nano /etc/fstab
- Add the following line, replacing the UUID value with the one from your drive (example
42B3-CF79
), mount location (example/mnt/AlanDoozTV
) and file system type (exampleexfat
)
UUID=42B3-CF79 /mnt/AlanDoozTV exfat defaults,auto,users,rw,nofail 0 0
- Mount the first time
sudo mount -a
Installing Homebridge, Samba and Plex with Docker-Compose
First steps
- Creating neccesary folder structure
mkdir -p /homebridge /plex/config
- Creating a docker-compose.yml file with the following content
version: "2"
services:
homebridge:
image: oznu/homebridge:latest
container_name: homebridge
restart: always
network_mode: host
environment:
- HOMEBRIDGE_CONFIG_UI_PORT=8581
volumes:
- ./homebridge:/homebridge
logging:
driver: json-file
options:
max-size: "10mb"
max-file: "1"
samba:
image: dperson/samba:latest
container_name: samba
restart: always
read_only: false
command: '-u "pi;password" -s "AlanDoozTV;/AlanDoozTV;yes;no;" -p'
stdin_open: true
tty: true
ports:
- 139:139
- 445:445
volumes:
- /usr/share/zoneinfo/America/Argentina/Buenos_Aires:/etc/localtime
- /mnt/AlanDoozTV:/AlanDoozTV
environment:
- USERID=0
- GROUPID=0
plex:
image: lscr.io/linuxserver/plex:latest
container_name: plex
network_mode: host
environment:
- PUID=1000
- PGID=1000
- VERSION=dockerl
volumes:
- ./plex/config:/config
- /mnt/AlanDoozTV/movies:/movies
- /mnt/AlanDoozTV/tv:/tv
restart: unless-stopped
tautulli:
container_name: tautulli
image: lscr.io/linuxserver/tautulli:latest
restart: unless-stopped
ports:
- 8181:8181
volumes:
- ./tautulli/config:/config
environment:
- PUID=1000
- PGID=1000
- TZ=America/Buenos_Aires
radarr:
image: lscr.io/linuxserver/radarr:latest
container_name: radarr
environment:
- PUID=1000
- PGID=1000
- TZ=America/Buenos_Aires
volumes:
- ./radarr/config:/config
- /mnt/AlanDoozTV/downloads:/downloads
- /mnt/AlanDoozTV/movies:/movies
ports:
- 7878:7878
restart: unless-stopped
sonarr:
image: lscr.io/linuxserver/sonarr:latest
container_name: sonarr
environment:
- PUID=1000
- PGID=1000
- TZ=America/Buenos_Aires
volumes:
- ./sonarr/config:/config
- /mnt/AlanDoozTV/downloads:/downloads
- /mnt/AlanDoozTV/tv:/tv
ports:
- 8989:8989
restart: unless-stopped
prowlarr:
image: lscr.io/linuxserver/prowlarr:develop
container_name: prowlarr
environment:
- PUID=1000
- PGID=1000
- TZ=America/Buenos_Aires
volumes:
- ./prowlarr/config:/config
ports:
- 9696:9696
restart: unless-stopped
transmission:
image: lscr.io/linuxserver/transmission:latest
container_name: transmission
environment:
- PUID=1000
- PGID=1000
- TZ=America/Buenos_Aires
- TRANSMISSION_WEB_HOME=/transmission-web-control/
volumes:
- ./transmission/config:/config
- /mnt/AlanDoozTV/downloads:/downloads
- /mnt/AlanDoozTV/torrents:/torrents
ports:
- 9091:9091
- 51413:51413
- 51413:51413/udp
restart: unless-stopped
flaresolverr:
image: ghcr.io/flaresolverr/flaresolverr:latest
container_name: flaresolverr
environment:
- LOG_LEVEL=${LOG_LEVEL:-info}
- LOG_HTML=${LOG_HTML:-false}
- CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none}
- TZ=America/Buenos_Aires
ports:
- 8191:8191
restart: unless-stopped
- Initializing the containers
docker-compose up -d
How to connect to
Homebridge
Go to http://raspberrypi.local:8581
Samba
On MacOs you can go to Go on Finder, Connect to Server (⌘
+ K
) and with the user and password of the docker-compose.yml connect to the following url:
smb://raspberrypi.local
Plex
Go to http://raspberrypi.local:32400/web
Tautulli
Go to http://raspberrypi.local:8181
Radarr
Go to http://raspberrypi.local:7878
Sonarr
Go to http://raspberrypi.local:8989
Prowlarr
Go to http://raspberrypi.local:9696
Transmission
Go to http://raspberrypi.local:9091
FlareSolverr
http://raspberrypi.local:8191