Dynamic DNS
Time Required
5 Minutes
Difficulty
Easy
Required Knowledge
DNS, Cloudflare, Docker
If you have a dynamic DNS (your IP address changes), you can use a container to keep it in-sync with Cloudflare.
I would recommend against this unless there is a very specific use-case, eg a port forward for Plex or game servers. It is best practice to hide as much information as you can behind Cloudflare, as any attacks security risks can be mitigated by them.
If you are using NGIX proxy manager or something else similar, you should still be able to run those through a Zero Trust tunnel
Prerequisites
Domain managed by Cloudflare
API key
First you will need to generate an API key with write access to your domain/s DNS.
Navigate to https://dash.cloudflare.com/profile/api-tokens
At API tokens, click on 'Create Token'
Select the 'Edit zone DNS' and set the below
Give your token a name, eg "DDNS"
Permissions:
Zone
DNS
Edit
Zone Resources:
Include
All Zones (or select specific domains)
Click on 'Continue to Summary'
Click on 'Create token'
Save your API key to your password vault
DDNS Container
Deploy your Docker stack
You can use the below compose file,
Last updated