Configure Jenkins With Caddy


Recently, for some strange reasons, my Jenkins told me that my reversed proxy setup was broken. I use Caddy (to get automatic SSL) and forward all requests to a Jenkins docker instance running on my home machine. If you want more details, this post provides:

Correct Jenkins & Caddy Configuration

If you need just the config, here it is.

First, in Caddyfile, this is the configuration: {
	tls internal
	header X-Real-IP {remote}
		header_up X-Forwarded-Host {host}
		header_up X-Forwarded-For {remote_host}
		header_up X-Forwarded-Proto https

Now you can run caddy reload to load the changes.

In addition, you need to go to Manage Jenkins -> System and put your domain in:

Configure jenkins domain

Save the changes!

Now, you have a fully functional jenkins running on a SSL enabled website.


In this post, I’ve shown you how to setup Jenkins with Caddy.

Leave a Comment