Skip to content

About

Small Typescript code which updates Cloudflare DNS records as configured in environment variable using the public IPv4 address of the local machine.

Topics

Resources

Stars

44 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

CF_DDNS

Small Typescript code which updates Cloudflare DNS records as configured in environment variable using the public IPv4 address of the local machine.

Environment Variables

Environment file if defined must be present There are some environment variables which need to be defined before running the script for an successful update :

  • Mandatory :

    1. CF_API_TOKEN = Cloudflare API token generated by the user.
    2. DOMAIN = The domain name along with the TLD without any leading subdomain names. Example : example.com
  • Optional :

    1. SUBDOMAIN = Subdomain to be appended along with the DOMAIN environment variable.
      Example : if SUBDOMAIN = "eg1" along with DOMAIN = "example.com" is configured in the environment variables, then the resolved DNS name whose IPv4 will be created/updated will be eg1.example.com

Dependencies

Preferred runtime is Bun. The project was initialized in Bun.

Only 1 library is used : Official Cloudflare Typescript SDK for Node and compatible server side JS/TS runtimes.

Setup and Run

To install dependencies:

bun install

To run:

bun run start

This project was created using bun init in bun v1.2.4. Bun is a fast all-in-one JavaScript runtime.

About

Small Typescript code which updates Cloudflare DNS records as configured in environment variable using the public IPv4 address of the local machine.

Topics

Resources

Stars

44 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages