I’ve been setting up Pi-Hole in a Taiolscale Side on my old Intel Mac Mini
Following these instructions it works pretty well. The only issue I have is that Pi-hole will only work via http and not https.
I’ve been discussing this on the Tailscale Discord and have been told how to solve the issue on Unbuntu linux
I’d be looking to run these scripts from the container folder in Docker:
cd ~/docker/piside
And the final merged certificate should be in ~/docker/piside/etc-pihole/tls.pem (or maybe ~/docker/piside/etc/pihole/tls.pem
if you tailscale cert the cert(s) then you need to properly combine them in the right order in a .pem file
“this is what I use on ubuntu for this”
#!/bin/bash
DOMAIN=“you_ts_fqdn”
DEST_DIR=“/var/www”
PEM_FILE=“your_filename.pem”# Run tailscale cert to generate cert and key files
if sudo tailscale cert --cert-file=“${DEST_DIR}/${DOMAIN}.crt” --key-file=“${DEST_DIR}/${DOMAIN}.key” “$DOMAIN”; then
echo “Tailscale cert generated successfully”
else
echo “Error: Failed to generate tailscale cert” >&2
exit 1
fi# Combine crt and key into a single PEM file
if cat “${DEST_DIR}/${DOMAIN}.key” “${DEST_DIR}/${DOMAIN}.crt” > “${DEST_DIR}/${PEM_FILE}”; then
echo “Combined PEM file created: ${PEM_FILE}”
else
echo “Error: Failed to create combined PEM file” >&2
exit 1
fi# Change ownership and permission to www-data
if sudo chown www-data:pihole “${DEST_DIR}/${DOMAIN}.crt” “${DEST_DIR}/${DOMAIN}.key” “${DEST_DIR}/${PEM_FILE}” &&
sudo chmod 640 “${DEST_DIR}/${DOMAIN}.crt” “${DEST_DIR}/${DOMAIN}.key” “${DEST_DIR}/${PEM_FILE}”; then
echo “Ownership and permissions set for www-data”
else
echo “Error: Failed to change ownership or permissions” >&2
exit 1
fi
From that once I the merged PEM file is where I need it on the Mini I should be able to use HTTPS. Does this make sense at all?
If it is does then how they be migrated to it to an Apple Script(s) I can then run, or better (for me) use it all in an Apple Shortcut.
As always thanks i advance guys.