Media server for the rasbian OS. Tested on a Rasberry Pi 3+.
The project is mainly for learning purposes.
Based the install guide located here
Download Raspian Buster here
Make an empty file called SSH
in the root
folder of SD card.
cd SD_ROOT
touch SSH
Seems to take a long time to connect on first boot
Put the configuration below in wpa_supplicant.conf
file in the root
folder of SD card.
cd SD_ROOT
vi wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="YOUR_NETWORK_SSID"
psk="YOUR_WPA/WPA2_KEY"
key_mgmt=WPA-PSK
}
- Username: pi
- Password: raspberry
ssh pi@IP
sudo apt update
sudo apt upgrade -y
sudo raspi-config
- Expand Filesystem
- Memory Split, allocate 256 RAM to GPU
- Finally, you need to enable certain video codecs that don’t run as standard. These include VP6, VP8, MJPEG, and Theora, among others. To do this, you need to enable the camera. While no camera needs to be connected, enabling this feature will ensure the codecs can be used.
- Advanced Options > GL Driver and set Original non-GL desktop driver
sudo vi /etc/dphys-swapfile
Comment out the static swap size
sudo dphys-swapfile setup
sudo vim /etc/dhcpcd.conf
add the following to the end of the file
static domain_name_servers=8.8.8.8 8.8.4.4
sudo service dhcpcd restart
cat /etc/resolv.conf
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker pi
See issue here (same for linux)
sudo systemctl disable docker
This is to allow OS to automount required drives before Docker starts.
crontab -e
@reboot sleep 60 && systemctl start docker
sudo apt install docker-compose
sudo apt update
sudo apt install kodi
echo "@kodi" >> ~/.config/lxsession/LXDE-pi/autostart
https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=251645&sid=53d4d04842fd8e61f2c8cea77268b25e
Disable desktop.
sudo raspi-config
choose the option to boot to CLI autologin.
sudo tee -a /lib/systemd/system/kodi.service <<_EOF_
[Unit]
Description = Kodi Media Center
After = remote-fs.target network-online.target
Wants = network-online.target
[Service]
User = pi
Group = pi
Type = simple
ExecStart = /usr/bin/kodi-standalone
Restart = on-abort
RestartSec = 5
[Install]
WantedBy = multi-user.target
_EOF_
sudo systemctl enable kodi.service
Create Deluge Docker Container (ARM)
The admin interface is available at IP:8112 with a default user/password of admin/deluge.
- --net=host - Shares host networking with container, required.
- -v /config - deluge configs
- -v /downloads - torrent download directory
- -e PGID for GroupID - see below for explanation
- -e PUID for UserID - see below for explanation
- -e UMASK_SET for umask setting of deluge, optional , default if left unset is 022.
- -e TZ for timezone information, eg Europe/London
Sonarr Docker Container (ARM)
The admin interface is available at IP:8989
- -p 8989 - the port sonarr webinterface
- -v /config - database and sonarr configs
- -v /tv - location of TV library on disk
- -v /etc/localtime for timesync - see Localtime for important information
- -e TZ for timezone information, Europe/London - see Localtime for important - information
- -e PGID for for GroupID - see below for explanation
- -e PUID for for UserID - see below for explanation
Radarr Docker Container (ARM)
The admin interface is available at IP:7878
- -p 7878 - the port(s)
- -v /config - Radarr Application Data
- -v /downloads - Downloads Folder
- -v /movies - Movie Share
- -v /etc/localtime for timesync - see Localtime for important information
- -e TZ for timezone information, Europe/London - see Localtime for important information
- -e PGID for for GroupID - see below for explanation
- -e PUID for for UserID - see below for explanation
The admin interface is available at IP:9117
- -p 9117 - the port(s)
- -v /config - where Jackett should store its config file.
- -v /downloads - Path to torrent blackhole
- -v /etc/localtime for timesync - see Localtime for important information
- -e TZ for timezone information, Europe/London - see Localtime for important - information
- -e RUN_OPTS - Optionally specify additional arguments to be passed. EG. - --ProxyConnection=10.0.0.100:1234
- -e PGID for GroupID - see below for explanation
- -e PUID for UserID - see below for explanation
docker-compose up
sudo docker-compose start
sudo docker-compose stop
Always started Docker before the mount was up.
sudo systemctl edit docker.service
[Unit]
RequiresMountsFor=MOUNT_PATH
sudo systemctl daemon-reload
Always started Docker before the mount was up.
@reboot until [ -d MOUNT_PATH ]; do sleep 1; done; systemctl start docker