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™:
coolify.domain.com {
# WebSockets for Laravel Echo (Live logs, notifications)
@echo_ws {
path /app/*
}
reverse_proxy @echo_ws localhost:6001
# WebSockets for terminal
@terminal_ws {
path /terminal/ws
}
reverse_proxy @terminal_ws localhost:6002
# Web UI
reverse_proxy localhost:8000
# ... the rest of your configuration
# usually I enable zstd compression and disable SEO indexation
encode zstd gzip
header X-Robots "noindex, nofollow"
}Enjoy!