Skip to content

Latest commit

 

History

History
37 lines (21 loc) · 1.52 KB

README.md

File metadata and controls

37 lines (21 loc) · 1.52 KB

ddns-js

Automatically set CloudFlare DNS records (only works with A records) to own public ip.

Environment variables

API_TOKEN

Required: yes

The Cloudflare API token used for authorization.

Example: API_TOKEN=sWh9FHA5ow28zgdwTm8s4J0kUo8Td0imxhsNo9xJ

RECORDS

Required: yes

The zone id and record id of one or several DNS records. Zone id and record id are separated by / and multiple records are separated by ,. Records are processed from left to right, waiting for the previous record to finish processing before continuing.

Format

zone_id/record_id
OR
zone_id1/record_id1,zone_id2/record_id2,zone_id3/record_id3,...

Examples

RECORDS=cy94bddzspk61hg6foug0ne5149xx6ow/l9pjomh92a9bu0ek6v4579bu0h1cc6rx
RECORDS=cy94bddzspk61hg6foug0ne5149xx6ow/l9pjomh92a9bu0ek6v4579bu0h1cc6rx,cy94bddzspk61hg6foug0ne5149xx6ow/wl76os6x901dbg3533zwpqyaf31i56ay
RECORDS=cy94bddzspk61hg6foug0ne5149xx6ow/l9pjomh92a9bu0ek6v4579bu0h1cc6rx,fn2l48m2oj5t8u4vr1wznnrmu9ugc4eo/2va22fkitg20flj42ncl1txu43m1pc2l

REPEAT_MILLISECONDS

Required: no

The delay in milliseconds (integer) to wait before repeating the check of all records. If omitted the program will process the records once and exit.