SSL/TLS โ
CoolerControl supports TLS encryption to secure communication between the daemon and clients. This is especially important when accessing the daemon over a network.
How TLS Works in CoolerControl โ
CoolerControl uses a dual-protocol design: the same port (default 11987) handles both HTTP and HTTPS automatically. The daemon detects a TLS handshake on each incoming connection and responds accordingly.
- Localhost connections are always allowed over plain HTTP.
- Non-localhost connections over HTTP are automatically redirected to HTTPS with a
301redirect.
This means you don't need separate ports for HTTP and HTTPS โ everything goes through one port.
TLS Configuration โ
SSL/TLS is enabled by default for non-local connections using a self-signed certificate. You will see a security warning in your browser when accessing the daemon over a network.
SSL/TLS can be configured in the daemon's configuration file /etc/coolercontrol/config.toml:
[settings]
# Enable TLS
tls_enabled = true
# Path to TLS certificate file
tls_cert_path = "/path/to/cert.pem"
# Path to TLS private key file
tls_key_path = "/path/to/key.pem"or using environment variables:
CC_TLS=ON
CC_CERT_PATH="/path/to/cert.pem"
CC_KEY_PATH="/path/to/key.pem"After editing the configuration, restart the daemon:
sudo systemctl stop coolercontrold
sudo nano /etc/coolercontrol/config.toml
sudo systemctl start coolercontroldSelf-Signed Certificates โ
CoolerControl will automatically generate self-signed certificates if TLS is enabled and no custom certificate paths are configured. The generated files are stored at:
/etc/coolercontrol/coolercontrol.crtโ Self-signed TLS certificate/etc/coolercontrol/coolercontrol.keyโ TLS private key (permissions:0o600)
Certificate Details โ
The auto-generated self-signed certificate includes the following Subject Alternative Names (SANs):
localhost,localhost4,localhost6,localhost.localdomain,localhost4.localdomain4,localhost6.localdomain6127.0.0.1,::1,0.0.0.0,::
The certificate uses CN = CoolerControl self signed cert and Organization = CoolerControl.
Browser Trust for Self-Signed Certificates โ
When using a self-signed certificate, browsers will show a security warning. You can proceed past it:
Chrome:
- Navigate to
https://<daemon-ip>:11987/ - Click Advanced โ Proceed to <daemon-ip> (unsafe)
Firefox:
- Navigate to
https://<daemon-ip>:11987/ - Click Advancedโฆ โ Accept the Risk and Continue
TIP
To avoid repeated warnings, you can import the certificate into your OS trust store:
# Copy the cert to your local machine
scp root@remote-server:/etc/coolercontrol/coolercontrol.crt /tmp/
# Fedora/RHEL
sudo cp /tmp/coolercontrol.crt /etc/pki/ca-trust/source/anchors/
sudo update-ca-trust
# Debian/Ubuntu
sudo cp /tmp/coolercontrol.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates
# Arch
sudo trust anchor /tmp/coolercontrol.crtAfter importing, restart your browser for the change to take effect.
Using Let's Encrypt โ
For publicly accessible deployments, use Let's Encrypt to obtain free, trusted certificates. This eliminates browser security warnings and provides proper TLS trust.
Prerequisites โ
- A domain name pointing to your server's public IP (e.g.,
cooler.example.com) - Port 80 accessible from the internet (for HTTP-01 challenge), or the ability to set DNS TXT records (for DNS-01 challenge)
certbotinstalled on your server
Install Certbot โ
# Debian/Ubuntu
sudo apt install certbot
# Fedora/RHEL
sudo dnf install certbot
# Arch Linux
sudo pacman -S certbotObtain a Certificate โ
Standalone mode (simplest โ certbot runs its own temporary web server on port 80):
sudo certbot certonly --standalone -d your-domain.comWebroot mode (if you already have a web server or reverse proxy running on port 80):
sudo certbot certonly --webroot -w /var/www/html -d your-domain.comDNS challenge (for servers without port 80 access):
sudo certbot certonly --manual --preferred-challenges dns -d your-domain.comThis will prompt you to create a DNS TXT record. Follow the instructions to complete verification.
Configure CoolerControl to Use Let's Encrypt โ
Certificates are stored at /etc/letsencrypt/live/your-domain.com/. Update your daemon configuration:
[settings]
tls_enabled = true
tls_cert_path = "/etc/letsencrypt/live/your-domain.com/fullchain.pem"
tls_key_path = "/etc/letsencrypt/live/your-domain.com/privkey.pem"WARNING
The coolercontrold process needs read access to the Let's Encrypt key files. By default, /etc/letsencrypt/live/ and /etc/letsencrypt/archive/ are owned by root with restricted permissions. Since coolercontrold runs as root, this is typically not an issue, but verify with:
sudo ls -la /etc/letsencrypt/live/your-domain.com/Restart the daemon to apply:
sudo systemctl restart coolercontroldAuto-Renewal โ
Let's Encrypt certificates expire after 90 days. Set up automatic renewal:
Using the systemd timer (recommended):
sudo systemctl enable --now certbot-renewal.timerUsing cron:
# Add to root's crontab (sudo crontab -e)
0 0,12 * * * certbot renew --quietPost-Renewal Hook โ
To automatically restart coolercontrold after certificate renewal so it picks up the new certificate:
sudo certbot renew --deploy-hook "systemctl restart coolercontrold"To make this permanent, create a renewal hook file:
echo 'systemctl restart coolercontrold' | sudo tee /etc/letsencrypt/renewal-hooks/deploy/coolercontrold.sh
sudo chmod +x /etc/letsencrypt/renewal-hooks/deploy/coolercontrold.shVerify Renewal โ
Test that renewal works without actually renewing:
sudo certbot renew --dry-runTroubleshooting โ
- Permission errors on key files: Ensure coolercontrold can read the certificate and key. Check ownership and permissions under
/etc/letsencrypt/. - Port 80 blocked by firewall: The HTTP-01 challenge requires port 80. Temporarily open it or use the DNS challenge method instead.
- Certificate not updating after renewal: The daemon must be restarted to pick up new certificates. Set up a deploy hook as described above.
Certificate Renewal Note โ
CoolerControl reads TLS certificates at startup. If you replace or renew certificates, you must restart the daemon for the new certificates to take effect:
sudo systemctl restart coolercontroldReverse Proxy Alternative โ
Instead of configuring TLS directly in CoolerControl, you can use a reverse proxy to handle TLS termination. This is often more flexible and enables features like automatic Let's Encrypt certificate management. See the Reverse Proxy guide for detailed setup instructions with nginx, Caddy, and Traefik.
The allow_unencrypted Setting โ
By default, when TLS is enabled, non-localhost HTTP connections are redirected to HTTPS. If you need to allow unencrypted HTTP from non-localhost clients (for example, behind a trusted reverse proxy that connects over HTTP), you can set:
[settings]
allow_unencrypted = trueDANGER
This disables the HTTPS redirect for all non-localhost connections. Only use this in trusted network environments or when a reverse proxy handles TLS termination in front of CoolerControl.
See Also โ
- Reverse Proxy - Detailed reverse proxy setup guide
- Security Overview - Full security model reference
- Remote Access - Configure remote access to CoolerControl
- Access Protection - Set a strong password
- TCP Port and Address - Configure the daemon's network settings