# Configuring Mattermost Server for Secure Connection (HTTPS) in Docker Environment

**URL:** <https://forum.mattermost.com/t/configuring-mattermost-server-for-secure-connection-https-in-docker-environment/16760>\
**Category:** Troubleshooting\
**Created:** [August 31, 2023, 3:50am UTC](https://forum.mattermost.com/t/configuring-mattermost-server-for-secure-connection-https-in-docker-environment/16760 "2023-08-31T03:50:13Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![YiruChen](https://avatars.discourse-cdn.com/v4/letter/y/3ab097/32.png) [@YiruChen](https://forum.mattermost.com/u/YiruChen)\
**Post date:** [September 1, 2023, 9:52am UTC](https://forum.mattermost.com/t/configuring-mattermost-server-for-secure-connection-https-in-docker-environment/16760/3 "2023-09-01T09:52:04Z")

</div>

Hello,

I have encountered an unhealthy Docker container displaying the following error message in its logs: `curl: (7) Failed to connect to localhost port 8065 after 0 ms: Connection refused.` Based on the discussion found in this comment on the Mattermost forum ([Https access problem - #4 by marcokundt](https://forum.mattermost.com/t/https-access-problem/9522/4)), it seems that expose port 443 for HTTPS traffic is not working? (I set UseLetsEncrypt to true, so I didn’t mount the certificate files into the Docker container)

---

_[View the full topic](https://forum.mattermost.com/t/configuring-mattermost-server-for-secure-connection-https-in-docker-environment/16760)._
