Update README.md
This commit is contained in:
parent
09ecfbfd17
commit
e47b565a0f
1 changed files with 14 additions and 10 deletions
24
README.md
24
README.md
|
@ -27,11 +27,11 @@ cp cf_domains.yaml-example cf_domains.yaml
|
||||||
nano 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
|
```yaml
|
||||||
domain1.com:
|
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
|
_id: your_domain1.com_zone_id_here
|
||||||
sub1: your_sub1.domain1.com_dns_record_id_here
|
sub1: your_sub1.domain1.com_dns_record_id_here
|
||||||
sub2: your_sub2.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
|
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:
|
- (Optional) Create a symlink to use the script from anywhere:
|
||||||
```bash
|
```bash
|
||||||
|
@ -62,18 +64,20 @@ sudo chmod 644 /etc/caddy/Caddyfile
|
||||||
|
|
||||||
## 2. Usage
|
## 2. Usage
|
||||||
|
|
||||||
### 2.1 DDNS Update
|
### 2.1 Adding/Updating Domain Configuration
|
||||||
```
|
|
||||||
./cf ddns [--force]
|
|
||||||
```
|
|
||||||
Updates all domains with current IP. Use `--force` to update regardless of IP change.
|
|
||||||
|
|
||||||
### 2.2 Adding/Updating Domain Configuration
|
|
||||||
```
|
```
|
||||||
./cf <full-domain> [--ip <ip address>] --port <port>
|
./cf <full-domain> [--ip <ip address>] --port <port>
|
||||||
```
|
```
|
||||||
Adds or updates domain in Cloudflare and Caddyfile. Default IP is localhost.
|
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
|
### 2.3 Updating All Domains
|
||||||
```
|
```
|
||||||
./cf all [--force]
|
./cf all [--force]
|
||||||
|
|
Loading…
Reference in a new issue