https://github.com/dan5py/cloudflare-ddns
Cloudflare DNS Record updater
https://github.com/dan5py/cloudflare-ddns
Last synced: 2 months ago
JSON representation
Cloudflare DNS Record updater
- Host: GitHub
- URL: https://github.com/dan5py/cloudflare-ddns
- Owner: dan5py
- License: mit
- Created: 2023-03-05T23:33:58.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-08T20:16:15.000Z (about 2 years ago)
- Last Synced: 2025-01-12T07:36:24.039Z (4 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloudflare DNS Record Updater
Update your DNS Records IPs with this simple Python script.
Cloudflare API Reference:
## Installation
Install the required modules
```bash
pip install -r requirements.txt
```## Usage
```bash
python ddns-updater.py -r my.example.com
```### Multiple Records
```bash
python ddns-updater.py -r my.example.com my2.example.com
```### Settings
In order to update the DNS record you need to provide:
- `email`, used to login to Cloudflare
- `token`, your API token
- `zone`, the target zone IDYou can either use the cli arguments or hardcode those information directly in the script under the `ARGUMENTS SECTION`.
### CLI Arguments
| Argument | Default | Description | Required |
| :------------ | :------: | --------------------------------------------- | :------- |
| -e --email | / | The account email used to login to Cloudflare | No |
| -r --records | / | The name of the record(s) to update | Yes |
| -s --scoped | false | Use scoped API token | No |
| -t --token | / | Your API token | No |
| -z --zone | / | The target zone ID | No |
| -T --ttl | 1 (auto) | TTL of the record | No |
| -p --proxied | false | Enable Cloudflare proxy | No |
| -l --log-file | / | Path of the log file | No |
| -v --verbose | false | Enable verbose logging | No |
| -h --help | / | Show help message | No |
| -f --force | false | Force update | No |## License
[MIT](https://choosealicense.com/licenses/mit/)