Https access on portainer instalation

Hello all,

How can i make my mayan access be done through https instead of http ?



Hi Jorge,

there are several solutions, I personally prefer putting a reverse HTTP proxy server in front of Mayan (this applies not only to Mayan but to all kinds of web applications) which is also responsible to handle certificate related tasks.

When using portainer, then just span another container with a HTTP proxy and configure it to forward its traffic to the Mayan container’s http port. The only pitfall is to put any container behind the reverse proxy server into another network (which can be a docker network if all containers are on the same host or another subnet/VLAN if using different hosts). Make sure that your clients cannot access Mayan’s http port directly but only the reverse proxy.

I can recommend:

  • NGINX proxy manager (has a nice gui for setting up your web apps and https)
  • caddy (very lightweight, very easy to setup https because this is enabled by default)

When using Mayan only in your local area networks, you will need to generate a self signed certificate and configure your reverse proxy with it. When you have a public DNS name for your host, you could use LetsEncrypt, Cloudflare, etc to generate a public signed certificate for. Both NGINX proxy manager and Caddy make it very easy to configure and renew HTTPS certificates.

Maybe there are other ways by using traeffik, but this must be explained by someone else, as I have no idea about it yet :face_with_monocle:

1 Like