Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alvin0319/cloudflarednsupdater
An automatic cloudflare DNS record updater for dynamic IP addresses.
https://github.com/alvin0319/cloudflarednsupdater
a-record clooudflare dns
Last synced: about 1 month ago
JSON representation
An automatic cloudflare DNS record updater for dynamic IP addresses.
- Host: GitHub
- URL: https://github.com/alvin0319/cloudflarednsupdater
- Owner: alvin0319
- Created: 2023-01-08T15:31:39.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T08:58:29.000Z (about 2 years ago)
- Last Synced: 2024-11-01T13:42:01.261Z (3 months ago)
- Topics: a-record, clooudflare, dns
- Language: Kotlin
- Homepage:
- Size: 69.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CloudflareDNSUpdater
An automatic cloudflare DNS record updater for dynamic IP addresses.# Usage
Once you execute the JAR, you will need to set up your configuration.
Find the config.json from following location:
* Linux: /home/\/.config/CloudflareDNSUpdater/config.json
* Windows: C:\Users\\\\AppData\Roaming\CloudflareDNSUpdater\config.jsonOr, you can specify the location of the config.json file by adding following option:
-DworkDir=\You should get an API token with the following permissions:
* Zone:Read
* Zone:Edit
* DNS:Edit
* DNS:Read## Config Schema
```json
{
"zoneId": "", // zone id can be found on your domain's overview page
"email": "", // your cloudflare account email
"key": "", // an API token with the permissions mentioned above
"domainName": "" // the domain name you want to update/create
}
```# Adding CloudflareDNSUpdater as a service
There are several ways to add CloudflareDNSUpdater as a service.## Windows
Window service system is sucks, I suggest you to use a [WinSW](https://github.com/winsw/winsw/releases).1. Download both JAR and WinSW.
2. Create a folder named CloudflareDNSUpdater and put the JAR and WinSW in it.
3. Rename WinSW.exe to cfdnsupdater.exe
4. Copy the [cfdnsupdater.xml](./assets/cfdnsupdater.xml) to the folder, and change things as you need.
5. Open CMD, run `.\cfdnsupdater.exe install` (this may require administrator privilege)To uninstall service, simply run: `.\cfdnsupdater.exe uninstall`
## Ubuntu
Put the following contents in `/etc/systemd/system/cfdnsupdater.service`, with replacing the needed things. (you may need sudo to perform this action)
```
[Unit]
Description=Cloudflare DNS Updater
After=network.target[Service]
User=root
Environment=
WorkingDirectory=
ExecStart=java -Xms512M -Xmx1G -Dworkdir= -jar
Restart=on-failure[Install]
WantedBy=multi-user.target
```Then execute the following commands:
```bash
sudo systemctl daemon-reload
sudo systemctl enable --now cfdnsupdater.service
```