SSL localhost not works

Hi,
trying to install MM on docker with nginx following :

well documented Deploy Mattermost via Docker - Mattermost documentation

no domain : in my case is a simple localhost.
to generate the keys I use:

openssl genrsa -out private-key.pem 2048
openssl req -new -x509 -key private-key.pem -out certificate.pem -days 365
mkdir -p ./volumes/web/cert
cp certificate.pem ./volumes/web/cert/cert.pem
cp private-key.pem ./volumes/web/cert/key-no-password.pem

BUT I get always
https

the bash script provided (issue-certificate.sh) not seems work with ā€œlocalhostā€
how to solve?

Mattermost load well at the ip server (without :port specified) 192.178.0.150
and I can read from the browser all the info provided during the creation of the certificate…
so I suppose that it works or not ?
Is it this the correct behavior ?

thank you!

Hi wdbusy, thanks for reaching out and providing detailed steps! For tips on configuring your setup for Docker and Nginx, the guide you shared (Deploy Mattermost via Docker) explains relevant steps, and you might also find the gencert.sh for Mattermost documentation helpful.

But, will this work also as requested, for localhost?

Yes, it can absolutely work for localhost. You need the trust chain that signs your certificates trusted by your OS trust store.

1 Like