Local SSL and mDNS - aaronwmorris/indi-allsky GitHub Wiki
indi-allsky operates over HTTPS by default. On Debian package (.deb) installations, indi-allsky automatically establishes a local Certificate Authority (CA) using mkcert and advertises indi-allsky.local over Multicast DNS (mDNS) via avahi-daemon.
This provides browser-trusted TLS encryption across your local network without security warnings.
Note
This automated CA and mDNS integration is exclusive to the Debian package (.deb) installation workflow. Legacy source-based manual installations (setup.sh) generate traditional self-signed certificates.
To eliminate browser security warnings on your computer or phone, export the Root CA certificate from your camera and install it on your client devices once.
Run this command on your camera to export the root certificate:
sudo indi-allsky-ctl ssl-ca-export /tmp/indi-allsky-ca.pemAlternatively, download it directly from your computer via SSH:
ssh <user>@indi-allsky.local "sudo indi-allsky-ctl ssl-ca-export" > indi-allsky-ca.pemInstall indi-allsky-ca.pem on each computer or phone accessing the camera:
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain indi-allsky-ca.pem(Or double-click the file in Finder > select System keychain > set trust to Always Trust).
Open PowerShell as Administrator:
Import-Certificate -FilePath .\indi-allsky-ca.pem -CertStoreLocation Cert:\LocalMachine\Root(Or double-click the file > Install Certificate > Local Machine > Trusted Root Certification Authorities).
sudo cp indi-allsky-ca.pem /usr/local/share/ca-certificates/indi-allsky-ca.crt
sudo update-ca-certificates- AirDrop or email
indi-allsky-ca.pemto your device. - Go to Settings > Profile Downloaded > Install.
- Go to Settings > General > About > Certificate Trust Settings and enable full trust for the root certificate.
- Transfer
indi-allsky-ca.pemto device storage. - Open Settings > Security > More Security Settings > Encryption & credentials.
- Tap Install a certificate > CA certificate and select the file.
Once installed, navigating to https://indi-allsky.local/ will display a secure padlock icon in your browser.
-
Root CA (
rootCA.pem): Valid for 10 years (does not need frequent replacement). -
Leaf Server Certificate (
*.pem): Valid for 2 years and 3 months (enforced by modern browser standards).
A systemd timer (indi-allsky-ssl-renew.timer) runs weekly on the camera. If the leaf certificate expires within 30 days, it automatically generates a new leaf certificate and reloads the web server.
Tip
Because the Root CA does not change during renewal, your client devices will automatically trust renewed certificates without re-importing anything.
To trigger or force a renewal manually (e.g. after moving the camera to a new IP address):
# Check validity and renew if within 30 days of expiration:
sudo indi-allsky-ctl ssl-renew
# Force immediate regeneration and web server reload:
sudo indi-allsky-ctl ssl-renew --forceFor users interested in the underlying implementation:
┌────────────────────────────────────────┐
│ Client Device │
│ (PC / Mac / iPhone / iPad) │
│ │
│ Root Trust Store: rootCA.pem │
└──────────────────┬─────────────────────┘
│
HTTPS Request: │ mDNS Resolution:
https://indi-allsky.local/ │ "indi-allsky.local" -> 192.168.1.50
│
▼
┌────────────────────────────────────────┐
│ indi-allsky │
│ │
│ Avahi mDNS: │
│ - indi-allsky.local │
│ - _indi-allsky._tcp on HTTPS_PORT │
│ │
│ Web Server (Caddy / Nginx / Apache): │
│ - Leaf Cert (signed by rootCA.pem) │
│ │
│ Local CA Directory: │
│ - /etc/indi-allsky/ca/rootCA.pem │
└────────────────────────────────────────┘
-
Avahi Daemon: Broadcasts
indi-allsky.localvia/etc/avahi/hosts. -
Dedicated Service Type: Publishes
_indi-allsky._tcpvia/etc/avahi/services/indi-allsky.serviceon the configuredHTTPS_PORT. -
TXT Records: Includes
app=indi-allsky,path=/indi-allsky,ssl=true,version, andmacto support Home Assistant Zeroconf discovery without colliding with generic HTTP devices.
Certificates are generated with Subject Alternative Names (SAN) for indi-allsky.local, localhost, 127.0.0.1, ::1, and any active local network IPs. They are stored at:
| Web Server | Certificate Path | Private Key Path | Permissions |
|---|---|---|---|
| Caddy | /etc/caddy/ssl/indi-allsky_caddy.pem |
/etc/caddy/ssl/indi-allsky_caddy.key |
root:caddy (0640 key) |
| Nginx | /etc/nginx/ssl/indi-allsky_nginx.pem |
/etc/nginx/ssl/indi-allsky_nginx.key |
root:root (0600 key) |
| Apache | /etc/apache2/ssl/indi-allsky_apache.pem |
/etc/apache2/ssl/indi-allsky_apache.key |
root:root (0600 key) |