Update README.md
This commit is contained in:
parent
09ecfbfd17
commit
e47b565a0f
1 changed files with 14 additions and 10 deletions
22
README.md
22
README.md
|
@ -27,7 +27,7 @@ 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:
|
||||
|
@ -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 <full-domain> [--ip <ip address>] --port <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]
|
||||
|
|
Loading…
Reference in a new issue