Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/awayume/cfddns
A Cloudflare DDNS tool written in Python.
https://github.com/awayume/cfddns
cloudflare ddns ddns-client ddns-script ddns-updater dns python python3
Last synced: 5 days ago
JSON representation
A Cloudflare DDNS tool written in Python.
- Host: GitHub
- URL: https://github.com/awayume/cfddns
- Owner: Awayume
- License: mit
- Created: 2022-11-23T04:56:03.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-13T09:29:03.000Z (9 months ago)
- Last Synced: 2024-02-13T11:23:59.621Z (9 months ago)
- Topics: cloudflare, ddns, ddns-client, ddns-script, ddns-updater, dns, python, python3
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cfddns (Cloudflare DDNS tool)
This is a script to use Cloudflare as DDNS.
This works on Linux only.## How to use
### 1. Get a Cloudflare Zone ID and a Service key
Access your Cloudflare dashboard of your domain.
On "API" section, you can find "Zone ID".
Next, access [API Tokens page](https://dash.cloudflare.com/profile/api-tokens), and create new API Token.
You should grant permissions "Zone/DNS/Read" and "Zone/DNS/Edit".
Also, you should add your domain to "Zone Resources".
I recommend select "Include/Specific zone/[domain]" because token is saved on the text file.### 2. Edit configuration file
The configuration file format is written below.### 3. Execute cfddns
You should install Python 3 to execute cfddns.
You can execute cfddns with command line, but I recommend use systemd.
The example is written below.## Configuration file format
```
# cfddns config
zone_id=[Zone ID]
service_key=[API Token]
domains=[a.example.com],[b.example.com]
ipv6=[yes/no]
```## Example of systemd unit file
```
[Unit]
Description = Cloudflare DDNS Service[Service]
ExecStart = /usr/local/sbin/cfddns
Restart = always
Type = simple
StandardOutput = journal
StandardError = journal[Install]
WantedBy = multi-user.target
```## Known issues
- If domain is not A or AAAA record, cfddns will crash.
- If record has other records (ex. MX, TXT) as same name, cfddns will crash.
- Is is not able to set both A and AAAA record.
- Only one zone can be set.
- Configuration file format is too strict.