Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
/ caddy-cf Public archive

caddy v2 with the cloudflare & dynamicdns module

Notifications You must be signed in to change notification settings

haq/caddy-cf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

create and publish docker image docker image size github code size in bytes

caddy-cf

A caddy docker image containing the cloudflare & dynamicdns modules.

docker-cli

volumes

docker volume create caddy_config
docker volume create caddy_data

container

docker run -d \
  --name caddy \
  --restart unless-stopped \
  --network host \
  -e CLOUDFLARE_API_TOKEN=cf_api_token \
  -v "$PWD"/Caddyfile:/etc/caddy/Caddyfile \
  -v caddy_config:/config \
  -v caddy_data:/data \
  ghcr.io/haq/caddy-cf

caddyfile

{
    email email_address_for_notifications
    dynamic_dns {
        provider cloudflare {env.CLOUDFLARE_API_TOKEN}
        domains {
            domain.com sub
            domain.com sub1
        }
        check_interval 5m
        ip_source simple_http https://icanhazip.com
        versions ipv4 ipv6
        ttl 1h
    }
}

(cloudflare) {
    tls {
        dns cloudflare {env.CLOUDFLARE_API_TOKEN}
    }
}

sub.domain.com {
    import cloudflare
    reverse_proxy ip:port
}

sub1.domain.com {
    import cloudflare
    reverse_proxy ip:port
}

About

caddy v2 with the cloudflare & dynamicdns module

Topics

Resources

Stars

Watchers

Forks

Packages