If you have a dynamic public IP, you'll have to set up DDNS since a normal DNS only points to an ip statically, and if your ip changes, everything goes down until you update the DNS record. DDNS does this automatically. select a reliable service: noip.com duckdns.org dyn.com dynv6.com follow their install instructions. Generally, your router will have DDNS support. If it does not, you can install a DDNS client on your server (apt install ddclient)