Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Mailu Rancher Catalog

Rancher Catalog for mail server.

How to

  • Just add to Rancher custom catalog in "Admin -> Settings -> Catalog".
  • You need to provide a cert.pem and key.pem files in ${ROOT}/certs. For example, in /mailu/certs/.

Using the "Let's Encrypt" stack from the Rancher Catalog

The Let's Encrypt stack from the Rancher Catalog uses: janeczku/rancher-letsencrypt.

That stack takes care of generating TLS / SSL certificates with Let's Encrypt, updating them and adding the certificates to your Rancher Certificate "store".

You can read the full updated documentation for that stack in the GitHub repository:

You need to pay special attention to the configuration for certificate renewal. You can configure it with several DNS providers or do it just using a Rancher Load Balancer and redirecting a specific route ( to the Let's Encrypt stack service:

For Mailu you also need to have those certificates in a path in the host, for example in /mailu/certs/.

To use the Let's Encrypt stack to generate the certificates and use them inside Mailu, you can do the following:

Note: for this example let's assume that your domain is and that the Mailu ${ROOT} directory is at /mailu/. Update it as according to your configuration.

  • Create the Let's Encrypt stack from the Rancher Catalog following its documentation.
  • Enter in the Let's Encrypt stack and click the "upgrade" button of the letsencrypt service.
  • Go to the "Volumes" tab, it will have a Docker named volume as lets-encrypt:/etc/letsencrypt.
  • Update that named volume to be a host volume, for example: /etc/
  • Now, after creating the certificates (or renovating them) you will have your certificates as: fullchain.pem and privkey.pem.
  • Those certificates will be under the path: /etc/
  • Now, you have your certificates in your host in that path, but you need them inside the Mailu path, i.e. in: /mailu/certs/cert.pem and /mailu/certs/key.pem.
  • To achieve that, create the /mailu/certs/ directory (if you haven't already):
mkdir -p /mailu/certs/
  • Go to that directory:
cd /mailu/certs/
  • And there, create a link (a hard link, not a symbolic link) to those files, but with the names that you need to have inside (key.pem and cert.pem):
ln /etc/ key.pem
ln /etc/ cert.pem
  • Now you can start (or re-start) your Mailu Stack.

  • As you are using the Rancher Catalog Let's Encrypt stack to generate your certificates, you shouldn't use the integrated certbot with the variable ENABLE_CERTBOT, mark it as False.

  • If you want to use a Rancher Load Balancer to handle HTTPS connections with the certificate generated with the Let's Encrypt stack (working as a TLS / SSL termination proxy) you should choose the alternative frontend that doesn't implement HTTPS itself (giving that task to the Rancher Load Balancer), so instead of nginx as frontend, you can use:

  • Then, to make sure that every http request gets redirected to https you can start a service (container) that just redirects any http to https, for example using the Docker image: jamessharp/docker-nginx-https-redirect and configuring routes in your Rancher Load Balancer pointing any http to that container so that it gets converted to https.

Using jwilder/nginx and JrCs/docker-letsencrypt-nginx-proxy-companion

  • If you need jwilder/nginx support and JrCs/docker-letsencrypt-nginx-proxy-companion, you need to manually symlink cert produce by JrCs/docker-letsencrypt-nginx-proxy-companion to cert.pem and key.pem in ${ROOT}/certs of your Mailu install.


Rancher catalog entries






No releases published


No packages published

Contributors 4