Updated Cloudflare Dynamic DNS updater README.md
This commit is contained in:
parent
77b43a3bce
commit
b8d7db00b1
@ -20,7 +20,7 @@ This script updates A records in Cloudflare with your current public IP as repor
|
|||||||
---
|
---
|
||||||
|
|
||||||
## 📁 Project Structure
|
## 📁 Project Structure
|
||||||
|
```
|
||||||
.
|
.
|
||||||
├── update_cloudflare_ip.sh # Main script
|
├── update_cloudflare_ip.sh # Main script
|
||||||
├── zones/ # Folder for per-domain config files
|
├── zones/ # Folder for per-domain config files
|
||||||
@ -28,7 +28,7 @@ This script updates A records in Cloudflare with your current public IP as repor
|
|||||||
│ └── another_domain.env
|
│ └── another_domain.env
|
||||||
└── logs/ # Auto-created daily log files
|
└── logs/ # Auto-created daily log files
|
||||||
└── update_2025-10-05.log
|
└── update_2025-10-05.log
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -47,6 +47,8 @@ CLOUDFLARE_API_TOKEN="your_cloudflare_api_token"
|
|||||||
DNS_NAME="subdomain.domain.com"
|
DNS_NAME="subdomain.domain.com"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## ✅ Use Cloudflare API Tokens with permission:
|
## ✅ Use Cloudflare API Tokens with permission:
|
||||||
Zone → DNS → Edit for the required zone.
|
Zone → DNS → Edit for the required zone.
|
||||||
|
|
||||||
@ -67,6 +69,8 @@ Check logs:
|
|||||||
cat logs/update_$(date +%F).log
|
cat logs/update_$(date +%F).log
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 🕒 Automation (Cron Example)
|
## 🕒 Automation (Cron Example)
|
||||||
|
|
||||||
To run the script every 10 minutes, edit your crontab:
|
To run the script every 10 minutes, edit your crontab:
|
||||||
@ -85,6 +89,7 @@ Or, if you want to keep logs automatically:
|
|||||||
*/10 * * * * /path/to/update_cloudflare_ip.sh >> /path/to/logs/cron.log 2>&1
|
*/10 * * * * /path/to/update_cloudflare_ip.sh >> /path/to/logs/cron.log 2>&1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## ✅ Requirements
|
## ✅ Requirements
|
||||||
|
|
||||||
@ -101,6 +106,8 @@ sudo apt install jq
|
|||||||
brew install jq
|
brew install jq
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 🔐 Security Tip
|
## 🔐 Security Tip
|
||||||
|
|
||||||
Never share your .env files or commit them to public repositories. They contain sensitive credentials.
|
Never share your .env files or commit them to public repositories. They contain sensitive credentials.
|
||||||
@ -113,6 +120,7 @@ zones/*.env
|
|||||||
logs/
|
logs/
|
||||||
```
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 🙋 FAQ
|
## 🙋 FAQ
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user