Caddy running in system container (Incus/LXD) cannot bind domain

1. The problem I’m having:

Incus 6.10.1

incus launch images:ubuntu/24.04 caddy
incus config device add caddy caddy-port-80 proxy listen=tcp:0.0.0.0:80 connect=tcp:127.0.0.1:80
incus config device add caddy caddy-port-443 proxy listen=tcp:0.0.0.0:443 connect=tcp:127.0.0.1:443

Caddy config

{
    "apps": {
        "http": {
            "servers": {
                "example": {
                    "listen": [
                        "ubuntu.caddy.example.com:80"
                    ],
                    "routes": [
                        {
                            "handle": [
                                {
                                    "handler": "static_response",
                                    "body": "Hello, world!"
                                }
                            ]
                        }
                    ]
                }
            }
        }
    }
}

Caddy config error

{"error":"loading config: loading new config: http app module: start: listening on ubuntu.caddy.example.com:80: listen tcp 11.22.33.444:80: bind: cannot assign requested address"}

When I don’t bind any domain, it works.

                    "listen": [
                        ":80"
                    ],

11.22.33.44 is Incus host IP address. Domain ubuntu.caddy.example.com DNS points to 11.22.33.44

Any ideas, please?

2. Error messages and/or full log output:

{"error":"loading config: loading new config: http app module: start: listening on ubuntu.caddy.example.com:80: listen tcp 11.22.33.444:80: bind: cannot assign requested address"}

3. Caddy version:

v2.9.1

4. How I installed and ran Caddy:

xcaddy build --with github.com/mholt/caddy-l4

a. System environment:

Incus/LXD system container
Host and container both Ubuntu 24.04

b. Command:

./caddy start

./caddy reload --config caddy.json

d. My complete Caddy config:

{
    "apps": {
        "http": {
            "servers": {
                "example": {
                    "listen": [
                        "ubuntu.caddy.example.com:80"
                    ],
                    "routes": [
                        {
                            "handle": [
                                {
                                    "handler": "static_response",
                                    "body": "Hello, world!"
                                }
                            ]
                        }
                    ]
                }
            }
        }
    }
}

5. Links to relevant resources:

Thank you!

With a redacted domain, I can’t see the DNS records. You said that 11.22.33.44 is the Incus IP address, but the log is showing 11.22.33.444. Is this accurate?

Either something is listening to port 80 already, or that’s an invalid IP.