Use Caddy Reverse Proxy for Kibana

Nginx is probably the most widely used reverse proxy software out there. But when it comes to Docker, I have started to favor Caddy over it. Caddy is a lightweight web server written in Go. Among its advantages are extremely simple configuration and support for automatic Let’s Encrypt certificates. Certainly the automatic HTTPS simplifies any Docker setup. While it is not yet included in repositories and therefore lacks automatic updates, Docker nullifies this drawback. So, I will show you how to setup Caddy reverse proxy for Kibana.

Configuration example

You will find configuration for Caddy stored in /etc/Caddyfile. For instance, it might look like this:

example.com {
  basicauth / secret_user secret_password
  proxy /kibana 127.0.0.1:5601 {
    transparent
    without /kibana
  }
}

As you can see, the syntax is very concise. Now, let’s go through the various options:

Conclusion

In just a couple of lines, you have setup Caddy reverse proxy for Kibana. Complete with HTTPS and automatic certificates. That was really easy, right? Now you understand, why Caddy is quickly becoming my favorite proxy. While you’re at it, try these tips to increase Wordpress performance.