Caddy-incus-upstreams: routing based on incus config

I wrote a Caddy plugin that can automagically route to Incus instances based on user config settings :nerd_face: This is inspired by the likes of Traefik (amongst others) and Docker label handling. I’ve not tested it a lot but the first localhost tests are working out nicely! Please feel free to give it a shot, I’d love to hear if it works for you. Patches always welcome!

decentral1se/caddy-incus-upstreams: Incus dynamic upstreams for Caddy v2+ 🧨 - caddy-incus-upstreams - Co-op Cloud Code

4 Likes

Cool! Does this work with the wildcards?

*.your-subdomain.example.com {
  reverse_proxy {
    dynamic incus
  }
}

I’d love to know myself @Tetrov if you get time to test :upside_down_face:

1 Like

@Tetrov ended up diving in, it works! You just need to follow the DNS plugin route (described here How to use DNS provider modules in Caddy 2 - Wiki - Caddy Community) due to that being the main way most providers support issuing wildcard certificates. In general, my code seems to behave well so far and not interfere with the usual Caddy feature set, so that’s good :upside_down_face:

1 Like

SWEET! I was going to start on this soon, I’m glad you did it!