This article is written i relation to the previous posts on how to install and configure Home Assistant Snap and Home Assistant Configurator.
The installation process in this article is general and do not required Home Assistant installed to work. If you’re unfamiliar of how snap packages works its recommended to read the previous written posts, as they give you a brief introduction.
In this tutorial we’ll be using Google Domains as the registrar. There are examples for configurations for the most used dynamic DNS providers in ddclients repository at github, that can help you with other providers.
Install ddclient with the following command:
sudo snap install ddclient-snap
When the installation is complete, open the empty file located at
/var/snap/ddclient-snap/current/etc/ddclient/ddclient.conf to start configuring
sudo vi /var/snap/ddclient-snap/current/etc/ddclient/ddclient.conf
If you’re not using Ubuntu Core, then you can swap out
vi with your favorite editor, for example
Configure the DNS provider
This is how I do it for my Google Domain and most DNS providers already offer explanations on how you configure ddclient for their service.
- Login to the registrar overview of Google Domains.
- Clikk «manage» behind the domain you want to setup dynamic DNS for.
- Choose DNS from the menubar on the left and scroll down to «Synthetic records».
- Create a new Dynamic DNS (select from dropdown) subdomain.
- Press the arrow button next to the newly created subdomain to expand the details, and choose «view credentials».
Go back into the editor as described in the installation process and paste the configuration below into your configuration file. Remember to set the
password fields, and note the apostrophe surrounding the password, which Google Require.
ssl=yes use=web, web=checkip.dyndns.com protocol=googledomains server=domains.google.com login=USERNAME password='PASSWORD' dynamic.domain.com verbose=yes
(Or go to ddclient.conf.in to find the configuration for your provider.)
Open up a new terminal-session and monitor the logs before you restart ddclient.
sudo journalctl -xef --unit=snap.ddclient-snap.daemon
sudo snap restart ddclient-snap.daemon
If you get a positive response, edit the configurations file and remove
verbose=yes from the end. Restart
ddclient again to apply the new configuration.
We have now configured
ddclient to refresh the DNS entry for our domain.
In the upcoming post we’ll show how you can secure your Home Assistant installation with SSL.
For anyone interested in the source code, want’s more detailed information about the release or needs to file a bug report, head over to the official repository.
If you have any questions, do not hesitate to leave a comment.
Until next time!