You just need something on your network that monitors your IP and updates your DNS when your home IP changes. "Dynamic DNS Update Client" yields results in Google that will be a good start to understanding.
> There are some dynamic DNS services but that kinda defeats the self-hosted part.
No, selfhosting at home doesn't mean you have to host a public DNS server. You will definitely need some external DNS pointing to your home network. There are multiple free providers.