Install new middleware to existing install

I want to use the http.login and http.jwt directive, but I already have caddy installed. My caddy.go file looks like this. How do i these to an existing install?


import (
    "github.com/mholt/caddy/caddy/caddymain"

    _ "github.com/pyed/ipfilter"
    _ "github.com/hacdias/caddy-webdav"
    _ "github.com/epicagency/caddy-expires"
    _ "github.com/caddyserver/dnsproviders/cloudflare"
)

func main() {
    caddymain.EnableTelemetry = false
    caddymain.Run()
}

You’ll need to build Caddy again, with the plugins included, and then you’ll probably want to move the resulting binary over top the current one.

Hey @Whitestrake. Sorry for the super delayed response. Instead of building from source, can I just run the install script with the full list of plugins? Would that effectively write over the old setup?

Yeah, that should be absolutely fine - using the install script calls the build server. You’re building it new, you’re just not building it yourself. Either way, you’re getting a brand new binary to replace the one you have at the moment.