Raspberry Pi - CUPS

[ 465.594442] sd 0:0:0:0: [sda] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB)
[ 465.595797] sd 0:0:0:0: [sda] Write Protect is off
[ 465.595812] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 465.596219] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 465.607069] sda: sda1
[ 465.609873] sd 0:0:0:0: [sda] Attached SCSI removable disk
mkfs.ext4 -L Cups /dev/sda1
apt -y install cups hplip hpijs-ppds printer-driver-hpijs
usermod -aG lpadmin bs
service cups stop
echo "LABEL=Cups /var/spool/cups ext4 defaults,noatime 0 1" >> /etc/fstab
cd /var/spool/cups
rm -fr *
cd ..
mount -a
chown root:lp cups
cd cups
mkdir tmp
chmod 1700 tmp
chown root:lp tmp
cupsctl --remote-admin
service cups restart

SSL

To enable SSL without a self-signed certificate follow these steps. My server is called tanya.schau.dk - please adjust accordingly below:

cp tanya.schau.dk.key /etc/cups/ssl
cp tanya.schau.dk.crt /etc/cups/ssl
ServerAlias *
CreateSelfSignedCerts no
echo "192.168.1.242 tanya.schau.dk" >> /etc/hosts
sudo service cups restart