Traefik and docker labels

I’m trying to add netbird to my homelab, which recommends using traefik as the built-in proxy. Traefik has a concept of config providers, and when using podman it configures by querying labels on the instances.

I noticed that labels aren’t really a concept for incus, so I was wondering if anyone had a workaround for traefik that makes sense? I was thinking adding it to the config object, like this in tofu, but wouldn’t know how to tell traefik how to query this info.

resource "incus_instance" "netbird" {
  image = "docker:netbirdio/netbird-server"
  config = {
    "labels.traefik.enable" = "true"
  }
}

incus-compose implemented label support by using user.label.xxx as config values.

I don’t know a proxy yet that uses them though.

1 Like