New please be kind cant get local and duckdns happy together

1. The problem I’m having:

I want to host only a couple of docker container that stay local but also want to have a couple exposed to the web, at the moment i cant have both as when i exposed them to the web it trys to get certificates for my locals and they fail to display. when i use the variable local_certs duckdns uses the local certs.

help as chatgpt is rubbish and is leading me down rabbit holes?

2. Error messages and/or full log output:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

3. Caddy version:

docker v 2.10.0

4. How I installed and ran Caddy:

a. System environment:

docker

b. Command:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

c. Service/unit/compose file:

services:
  caddy:
    network_mode: host
    image: serfriz/caddy-duckdns:latest
    container_name: caddy
      #image: caddy:alpine
    restart: unless-stopped
    environment:
      - DUCKDNS_API_TOKEN=TOKEN # DuckDNS API token (if applicable)
    dns:
      - "192.168.0.242"
    ports:
      - "2019:2019"
      - "80:80"
      - "443:443"
      - "443:443/udp"
    volumes:
      - ./Caddyfile:/etc/caddy/Caddyfile
      - ./site:/srv
      - caddy_data:/data
      - caddy_config:/config
        # - /etc/hosts:/etc/hosts:ro
volumes:
  caddy_data:
  caddy_config:

d. My complete Caddy config:

{
	email fraserhunter@gmail.com
#	local_certs
}
pihole.home {
	#encode zstd gzip
	redir / /admin{uri}
	reverse_proxy http://192.168.0.242:8001
}
homepage.home {
	reverse_proxy http://192.168.0.242:3000
}
komodo.home {
	reverse_proxy http://192.168.0.242:9120
}
esp.home {
	reverse_proxy http://192.168.0.242:6052
}
z2mqqt.home {
	reverse_proxy http://192.168.0.242:8080
}
ab.home {
	reverse_proxy 192.168.0.242:13378
}
https://port.home {
	reverse_proxy 192.168.0.242:9443 {
		transport http {
			tls
			tls_insecure_skip_verify
		}
	}
}
#ha.localhost:8123 {
#	reverse_proxy 192.168.0.242:8123
#}
host1.domain.duckdns.org {
        reverse_proxy 192.168.0.242:13378
}
host2.domain.duckdns.org {
	reverse_proxy 192.168.0.242:8123
}

host3.domain.duckdns.org {
        reverse_proxy 192.168.0.1
}

5. Links to relevant resources:

I’m not sure I understand what you’re asking. Just to confirm - do you mean you don’t want a certificate and don’t want to use HTTPS for the internal sites? If that’s the case, you can just start each of those site entries in your Caddyfile with http://.

1 Like

thank you and sorry for the confusion and yes i would like to use https for my local severs so that i dont get the warning every time that i go to them buti it seems that i cant have both duckdns and the local site running in the same caddy file. I know I must be doing something wrong and any help would be amazing thanks.

please can you close this it was a formatting issue and sorry