From e47b565a0f790980db60b885d1c3441e09699505 Mon Sep 17 00:00:00 2001 From: sij Date: Mon, 7 Oct 2024 08:37:20 +0200 Subject: [PATCH] Update README.md --- README.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 88505ab..d604b85 100644 --- a/README.md +++ b/README.md @@ -27,11 +27,11 @@ cp cf_domains.yaml-example cf_domains.yaml nano cf_domains.yaml ``` -Edit the `cf_domains.yaml` file to include your domains, zone IDs, and DNS record IDs. The file structure should look like this: +Edit the `cf_domains.yaml` file to include your zone ID(s), and any pre-existing DNS record IDs. The file structure should look like this: ```yaml domain1.com: - '@': your_root_domain1.com_dns_record_id_here + '@': your_root_domain1.com_dns_record_id_here _id: your_domain1.com_zone_id_here sub1: your_sub1.domain1.com_dns_record_id_here sub2: your_sub2.domain1.com_dns_record_id_here @@ -42,7 +42,9 @@ domain2.net: sub2: sub2.domain2.net_dns_record_id_here ``` -Replace the example values with your actual Cloudflare zone IDs and DNS record IDs for each domain and subdomain you want to manage with this script. +Replace the example values with your actual Cloudflare Zone ID(s), and any DNS record IDs for **pre-existing** domains and subdomains you want to manage with this script. + +Note: you do not need to manually create each subdomains on Cloudflare and enter its DNS Record IDs here. This script will automate that process -- all it needs is the **Zone ID(s)** for the domain(s) you will be creating subdomains on. See the Usage section below. - (Optional) Create a symlink to use the script from anywhere: ```bash @@ -62,18 +64,20 @@ sudo chmod 644 /etc/caddy/Caddyfile ## 2. Usage -### 2.1 DDNS Update -``` -./cf ddns [--force] -``` -Updates all domains with current IP. Use `--force` to update regardless of IP change. - -### 2.2 Adding/Updating Domain Configuration +### 2.1 Adding/Updating Domain Configuration ``` ./cf [--ip ] --port ``` Adds or updates domain in Cloudflare and Caddyfile. Default IP is localhost. +Note: using [Tailscale](https://tailscale.com) IPs is highly recommended. + +### 2.2 DDNS Update +``` +./cf ddns [--force] +``` +Updates all domains with current IP. Use `--force` to update regardless of IP change. + ### 2.3 Updating All Domains ``` ./cf all [--force]