Source: https://github.com/atoy3731/cloudflare-updater
2.8K
This docker image gives you the ability to update a Cloudflare DNS record via the API to manage your DDNS on a homelab.
The source code can be found here: https://github.com/atoy3731/cloudflare-updater
Follow the guide here for creating a token: https://developers.cloudflare.com/api/tokens/create
Your token needs to have the following permissions for the zone you're trying to update:
This script uses the following environment variables for configurations.
| Environment Variables | Description | Example | Required |
|---|---|---|---|
| CLOUDFLARE_TOKEN | The API token for interacting with Cloudflare. | AbCdEf12345 | Yes |
| CLOUDFLARE_ZONE | The Cloudflare zone you want to update. | example.com | Yes |
| CLOUDFLARE_RECORD | The Cloudflare record you want to update | *.example.com | Yes |
| CLOUDFLARE_DNS_TTL | The TTL (in minutes) for the DNS entry. | 1 | No |
| INTERVAL_MINS | The interval (in minutes) you want the updater to run. | 5 | No |
| IP_URL | URL to acquire your public IP. Must return IP in plain-text. | https://checkip.amazonaws.com/ | No |
| LOG_LEVEL | Level for logging (info, debug, warning) | info | No |
git clone [email protected]:atoy3731/cloudflare-updater.gitcd deploy/dockerdocker-compose.yaml file with your configurations.docker-compose up -ddocker logs -f cloudflare-updatergit clone [email protected]:atoy3731/cloudflare-updater.gitcd deploy/k8ssecret.yaml.example and configmap.yaml.example files:
cp secret.yaml.example secret.yaml
cp configmap.yaml.example configmap.yaml
secret.yaml and configmap.yaml to you specific values.kubectl cluster-infokubectl apply -f .Content type
Image
Digest
sha256:9be54ca6c…
Size
4.7 MB
Last updated
3 months ago
docker pull atoy3731/cloudflare-updater