How to change SSL generated by Caddy?

Hi :slight_smile:

I don’t really understand why you need to change how Caddy issues tls certificates because of a mail server suite on the same domain.
Are you trying to reuse the same certificate issued by Caddy in postal?
Would be cool if you could elaborate a bit more on what you are trying to accomplish :))

Anyhow,
you should be able to change the tls key type both globally and on a per vhost basis:

For the former, you need to add the following into the global directive like so:

{
  key_type rsa4096
}

# Update this to match the hostname you wish to use for accessing the
# Postal web interface.
post.uhlhosting.ch {
  reverse_proxy 127.0.0.1:5000
}

# If you use open/click tracking you may need to add additional hosts
# to this file using the format below.

click.uhlhosting.ch {
  reverse_proxy 127.0.0.1:5000 {
    header_up X-Postal-Track-Host "1"
  }
}

You did reference the right thread in point 6., but tried to mix plain json with your Caddyfile, which is not possible.
A post later in the same thread mentioned the (then) new global Caddyfile option:

See Global options (Caddyfile) — Caddy Documentation for all the allowed values in key_type.

For forcing a special key_type on a single vhost, you could utilize the tls directive within that vhost.

2 Likes