DuckDNS provides a convenient and free dynamic DNS service to access your home network remotely. However, to keep your connection secure, it’s essential to set up an SSL certificate, enabling HTTPS access to your DuckDNS domain. Installing an SSL certificate encrypts your data, prevents unauthorized access, and ensures your connection remains private. Follow these detailed steps to properly configure an SSL certificate for your DuckDNS domain.
Method 1: Using Let’s Encrypt and Certbot (Recommended)
The most effective way to secure your DuckDNS domain with SSL is by using Let’s Encrypt, a free automated certificate authority. Certbot is a tool that simplifies obtaining and renewing certificates from Let’s Encrypt.
sudo apt update
sudo apt install certbot
yourdomain.duckdns.org with your actual DuckDNS domain:sudo certbot certonly --manual --preferred-challenges dns -d yourdomain.duckdns.org
Certbot will prompt you during this process to add a DNS TXT record to your DuckDNS domain.
Enter. Certbot will validate the DNS challenge and issue your SSL certificate. Upon successful completion, Certbot will display the paths to your certificate and private key files.server {
listen 443 ssl;
server_name yourdomain.duckdns.org;
ssl_certificate /etc/letsencrypt/live/yourdomain.duckdns.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain.duckdns.org/privkey.pem;
location / {
proxy_pass http://localhost:YOUR_PORT;
}
}
Replace YOUR_PORT with your application’s actual port number. Restart your web server to apply changes:
sudo systemctl restart nginx
Your DuckDNS domain is now secured with HTTPS and protected by a valid SSL certificate from Let’s Encrypt.
Join readers who trust AllThings.How
Add us as a preferred source on Google so our practical guides show up first next time you search.
Add to Google Preferences →Method 2: Using DuckDNS Add-on in Home Assistant
If you’re running Home Assistant, you can simplify the SSL setup by using the official DuckDNS add-on, which integrates Let’s Encrypt certificate management directly into your Home Assistant interface.
domains:
- yourdomain.duckdns.org
token: YOUR_DUCKDNS_TOKEN
lets_encrypt:
accept_terms: true
certfile: fullchain.pem
keyfile: privkey.pem
Replace yourdomain.duckdns.org and YOUR_DUCKDNS_TOKEN with your actual domain and DuckDNS token obtained from your DuckDNS account page.
/ssl/ directory.configuration.yaml) to use HTTPS and specify the paths to your SSL certificate files:http:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem
Restart Home Assistant to apply the changes. Your Home Assistant instance will now be accessible securely over HTTPS via your DuckDNS domain.
Maintaining Your SSL Certificate
Let’s Encrypt certificates expire every 90 days. Fortunately, Certbot and Home Assistant’s DuckDNS add-on automatically handles certificate renewals, ensuring uninterrupted secure access. However, periodically verify your SSL certificate’s validity and renewal status by checking your web server logs or Home Assistant notifications.
With your DuckDNS domain now secured with an SSL certificate, you can confidently access your home network remotely, knowing your connection is encrypted and protected.






