Can't Configure SSL with Docker Install of Mattermost

For feature requests, please see: Contributing Feature Proposals - Mattermost.

For troubleshooting questions, please post in the following format:

Summary

I successfully installed MM on AWS using your docker install instructions.
I created self signed cert & key (using openssl) to experiment with using SSL/TLS.
But could not get port 443 (https) to work. Port 80 works fine.
Running on AWS with an Ubuntu 16.0 AMI.

Steps to reproduce

  1. Create self signed cert.pem and key.pem with openssl.

openssl req -x509 -newkey rsa:4096 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 60 -nodes

  1. Copy private key and public key cert to docker web directory (first have to create the directory path)

mkdir -p ./mattermost-docker/volumes/web/cert/
sudo cp *.pem ./mattermost-docker/volumes/web/cert/

  1. Create and start docker images.

docker-compose up -d (note: already built)

  1. Go into MM via web and setup 1st user. Then configure TLS to use *.pem files. I’ve tried both redirecting port 80 to 443 and not redirecting port 80.
  2. stop and restart docker images.

docker-compose stop
docker-compose start

  1. Got into MM via secure web (HTTPS), and it times out with “This site can’t be reached”.

Expected behavior

I expect to be able to reach the MM login web page via port 443.

Observed behavior

HTTPS connection times out.

Hi @aalten, since Mattermost Docker installation is using nginx as a reverse proxy, you don’t need to setup MM to use the cert and key. The SSL is handled by nginx and off-loaded when nginx forward the request to MM.

Which version of MM docker are you using? If you cloned/checked out the repo before this (https://github.com/mattermost/mattermost-docker/commit/f7c78e675a20d01e18cf28c41d8a5a383c4d037b) commit, you need to set MATTERMOST_ENABLE_SSL=true in docker-compose.yml. Or you can just checkout the latest version of MM docker repo. You will need to rebuild the images. (docker-compose up -d --build)