Pre-requisites
- [[Mounting and User mapping]]
- Data folder for Sonarr downloads ready
In PvE
CT Creation
pct create \
112 \
/mnt/pve/evo/template/cache/alpine-3.20.tar.xz \
--hostname sonarr \
--memory 256 \
--net0 name=eth0,bridge=vmbr0,firewall=1,gw=192.168.0.1,ip=192.168.0.112/24,hwaddr=DE:AD:DE:AD:01:12,type=veth \
--storage localblock \
--rootfs local-lvm:0.5 \
--unprivileged 1 \
--ignore-unpack-errors \
--ostype alpine \
--password="123123123" \
--start 0 # No surprises from idmaps
--ssh-public-key="ssh-ed25519 **** The-Machine-You're-Using-Now"
Storage Mapping
echo "mp0: /mnt/pve/evo/data,mp=/data " >> /etc/pve/lxc/112.conf
echo "lxc.idmap: u 0 100000 1000" >> /etc/pve/lxc/112.conf
echo "lxc.idmap: g 0 100000 1000" >> /etc/pve/lxc/112.conf
echo "lxc.idmap: u 1000 1000 1" >> /etc/pve/lxc/112.conf
echo "lxc.idmap: g 1000 1000 1" >> /etc/pve/lxc/112.conf
echo "lxc.idmap: u 1001 101001 64535" >> /etc/pve/lxc/112.conf
echo "lxc.idmap: g 1001 101001 64535" >> /etc/pve/lxc/112.conf
In CT
pct start 112 && pct enter 112
Enable DHCP Leasing - Alpine
# Alpine
touch /hdd_request_ip.sh
echo "udhcpc -i eth0 -F $(hostname) -x hostname:$(hostname) -r $(hostname -i)" >> /hdd_request_ip.sh
echo -e "#!/sbin/openrc-run\n\
name=hdd_request_ip\n\
description=\"Request IP Address From Router\"\n\
command=\"sh ./hdd_request_ip.sh\"\n\
command_background=true\n\
pidfile=\"/run/\$name.pid\"\n\
# output_log=\"/var/log/homepage/output.log\"\n\
# error_log=\"/var/log/homepage/error.log\"\n\
\ndepend() {\n\
\tneed net\n\
\tuse dns logger netmount\n\
}" >> /etc/init.d/hdd_request_ip
chmod +x /etc/init.d/hdd_request_ip
rc-update add hdd_request_ip
service hdd_request_ip start
Install Sonarr
echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
apk update
apk add sonarr@testing
rc-update add sonarr # add to boot
adduser sonarr root
# Change the UID/GID of sonarr as it's set to 100:101
# 01/02/2024 -- maybe it changed? check the following:
cat /etc/passwd | grep sonarr # do if not 1000:1000
apk --no-cache add shadow
groupmod --gid 1000 sonarr
usermod --uid 1000 --gid 1000 sonarr
apk del shadow
service sonarr start
chmod 770 /data -R
chown 1000:1000 -R /data
You’re done
http://192.168.0.214:8989
Heart Beat
http://192.168.0.214:8989/ping