Is it possible to bind caddy to a specific IP?

Started by dopey1620, August 22, 2025, 06:30:52 PM

Previous topic - Next topic
I'm using HAProxy right now and getting really annoyed at the complexity of configuring HAProxy.  It's not too bad but jumping through all of the various UI steps when adding a new proxied host is annoying :)

Thinking of switching to Caddy but one thing I'm trying to figure out.  I configured a virtual IP for my proxy host, to dedicated an IP to the proxy.  With HAProxy i can create a listener that only binds to that IP address.

Caddy supports this natively with the `bind` directive but I'm not seeing this exposed in the opnsense caddy ui.  Am I missing something or is this just not something it currently supports? 

Any suggestions how to do this if the UI currently doesn't support it?  Not sure what the best way is to adda  "freeform" config if possible

# cat Caddyfile  | grep import
    import /usr/local/etc/caddy/caddy.d/*.global
import /usr/local/etc/caddy/caddy.d/*.conf

Hmm.  Wonder if i dropped a file into one of those directories if anything would wipe them out.


Thank you.  I have no idea how I missed that in the docs.