Sign inSign up

rvbcrs/npm-cloudflare-sync

By rvbcrs

•Updated 20 days ago

Automatically synchronizes Nginx Proxy Manager host configurations with Cloudflare DNS records.

Image
Networking
Web servers
0

3.2K

rvbcrs/npm-cloudflare-sync repository overview

⁠NPM Cloudflare Sync

A service that automatically synchronizes Nginx Proxy Manager host configurations with Cloudflare DNS records using the NPM REST API. It supports both A records for root domains and CNAME records for subdomains, with built-in DDNS functionality.

⁠Features

  • Uses NPM REST API to monitor proxy host changes
  • Automatically updates Cloudflare DNS records when changes are detected
  • Smart handling of root domains (A records) and subdomains (CNAME records)
  • Built-in DDNS (Dynamic DNS) functionality
  • Configurable check interval
  • Docker support with environment variable configuration
  • Token-based authentication with NPM
  • Automatic zone detection and management
  • Real-time synchronization
  • Configurable logging levels

⁠Required Environment Variables

  • CF_API_TOKEN: Cloudflare API token
  • CF_EMAIL: Cloudflare account email
  • NPM_API_URL: URL of your NPM instance (e.g., http://npm:81⁠)
  • NPM_EMAIL: NPM admin email
  • NPM_PASSWORD: NPM admin password

⁠Optional Environment Variables

  • CHECK_INTERVAL: Interval in milliseconds between checks (default: 10000)
  • LOG_LEVEL: Logging level (error, warn, info, debug) (default: info)
  • AUTO_CREATE_ROOT_RECORDS: Automatically create root A records when missing (default: false)

⁠Docker Installation

docker run -d \
  -e CF_API_TOKEN=your_token \
  -e CF_EMAIL=your_email \
  -e NPM_API_URL=http://your-npm-instance:81 \
  -e NPM_EMAIL=your_npm_email \
  -e NPM_PASSWORD=your_npm_password \
  -e CHECK_INTERVAL=10000 \
  -e LOG_LEVEL=info \
  -e AUTO_CREATE_ROOT_RECORDS=false \
  rvbcrs/npm-cloudflare-sync

Tag summary

Content type

Image

Digest

sha256:fad29e343…

Size

58 MB

Last updated

20 days ago

docker pull rvbcrs/npm-cloudflare-sync