Based on https://controlc.de/2013/09/10/debian-selbstgehosteter-dyndns-dienst/ and https://github.com/Josef-Friedrich/dyndns
For debian 10
apt install -y bind9 bind9-host bind9utils dnsutils unattended-upgrades vim
echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections
dpkg-reconfigure -f noninteractive unattended-upgrades