docs/main/deployment-guide/server/setup-tls.mdx
You have two options if you want users to connect with HTTPS:
Install a proxy such as NGINX and then set up TLS on the proxy. This is our recommended option if you have a large number of users (more than 200), or if you want to use a reverse proxy for other reasons, such as load balancing or caching. A proxy server delivers better performance and provides standard HTTP request logs.
Alternatively, if you have fewer than 200 users, you can set up TLS on Mattermost server. This is the easiest option when you don't need to use a reverse proxy.
- You can use Let's Encrypt to automatically install and set up the certificate.
- You can also specify your own certificate.
- You can use a self-signed certificate, but this is not recommended for production environments.
- Change the Listen Address setting to
:443.- Change the Connection Security setting to
TLS.- Change the Forward port 80 to 443 setting to
true.
Activate the CAP_NET_BIND_SERVICE capability to allow Mattermost to bind to low ports:
shsudo setcap cap_net_bind_service=+ep /opt/mattermost/bin/mattermost
Install the security certificate. Use Let's Encrypt to automatically install and setup the certificate, or specify your own certificate.
The certificate is retrieved the first time that a client tries to connect to the Mattermost server. Certificates are retrieved for any hostname a client tries to reach the server at.
true.config.json setting set to true to complete the Let's Encrypt certification.false.Password-protected certificates aren't supported.
</Note>Do not set up TLS on Mattermost before doing so for NGINX. It breaks the connection as the TLS prevents it from successfully communicating with the Mattermost server.
</Warning>More helpful resources: