Coolify self-hosting and Caddy as a proxy


A super short article explaining how to set up Caddy as a proxy for an auto-herbbed Coolify, with Websocket support.

Since Coolify uses websockets for real-time communication and Terminal, I've never succeeded until now by trying to help myself from Coolify Firewall documentation, Caddy, or GitHub issues on the Coolify repo.

I've finally assumed my responsibilities, and... asked to... ChatGPT... who managed to pull out a working Caddy configuration! Maybe not the most complete, but It works™:

 1coolify.domain.com {
 2    # WebSockets for Laravel Echo (Live logs, notifications)
 3    @echo_ws {
 4        path /app/*
 5    }
 6    reverse_proxy @echo_ws localhost:6001
 7
 8    # WebSockets for terminal
 9    @terminal_ws {
10        path /terminal/ws
11    }
12    reverse_proxy @terminal_ws localhost:6002
13
14    # Web UI
15	reverse_proxy localhost:8000
16
17    # ... the rest of your configuration
18    # usually I enable zstd compression and disable SEO indexation
19	encode zstd gzip	
20	header X-Robots "noindex, nofollow"
21}

Enjoy!