# Please check connection, Mattermost unreachable. If issue persists, ask administrator to check WebSocket port. with docker

**URL:** <https://forum.mattermost.com/t/please-check-connection-mattermost-unreachable-if-issue-persists-ask-administrator-to-check-websocket-port-with-docker/23158>\
**Category:** Troubleshooting\
**Created:** [May 12, 2025, 3:24pm UTC](https://forum.mattermost.com/t/please-check-connection-mattermost-unreachable-if-issue-persists-ask-administrator-to-check-websocket-port-with-docker/23158 "2025-05-12T15:24:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hjcho](https://avatars.discourse-cdn.com/v4/letter/h/c37758/32.png) [@hjcho](https://forum.mattermost.com/u/hjcho)\
**Post date:** [May 12, 2025, 3:24pm UTC](https://forum.mattermost.com/t/please-check-connection-mattermost-unreachable-if-issue-persists-ask-administrator-to-check-websocket-port-with-docker/23158/1 "2025-05-12T15:24:13Z")

</div>

For feature requests, please see: [https://mattermost.com/suggestions/](https://mattermost.com/suggestions/).

For troubleshooting questions, please post in the following format:

**Summary**  
When sending DM, this error occurred.  
_Please check connection, Mattermost unreachable. If issue persists, ask administrator to check WebSocket port._

**Steps to reproduce**  
I deployed Mattermost as docker-compose.

**Expected behavior**  
DM feature works normally.

**Observed behavior**  
I set up docker-compose like below.

```auto
# https://docs.docker.com/compose/environment-variables/
services:
  postgres:
    image: postgres:${POSTGRES_IMAGE_TAG}
    restart: ${RESTART_POLICY}
    security_opt:
      - no-new-privileges:true
    pids_limit: 100
    read_only: true
    tmpfs:
      - /tmp
      - /var/run/postgresql
    volumes:
      - ${POSTGRES_DATA_PATH}:/var/lib/postgresql/data
    environment:
      # timezone inside container
      - TZ

      # necessary Postgres options/variables
      - POSTGRES_USER
      - POSTGRES_PASSWORD
      - POSTGRES_DB

  mattermost:
    depends_on:
      - postgres
    image: mattermost/${MATTERMOST_IMAGE}:${MATTERMOST_IMAGE_TAG}
    restart: ${RESTART_POLICY}
    security_opt:
      - no-new-privileges:true
    pids_limit: 200
    read_only: ${MATTERMOST_CONTAINER_READONLY}
    tmpfs:
      - /tmp
    ports:
      - "8065:8065"
    volumes:
      - ${MATTERMOST_CONFIG_PATH}:/mattermost/config:rw
      - ${MATTERMOST_DATA_PATH}:/mattermost/data:rw
      - ${MATTERMOST_LOGS_PATH}:/mattermost/logs:rw
      - ${MATTERMOST_PLUGINS_PATH}:/mattermost/plugins:rw
      - ${MATTERMOST_CLIENT_PLUGINS_PATH}:/mattermost/client/plugins:rw
      - ${MATTERMOST_BLEVE_INDEXES_PATH}:/mattermost/bleve-indexes:rw
      # When you want to use SSO with GitLab, you have to add the cert pki chain of GitLab inside Alpine
      # to avoid Token request failed: certificate signed by unknown authority 
      # (link: https://github.com/mattermost/mattermost-server/issues/13059 and https://github.com/mattermost/docker/issues/34)
      # - ${GITLAB_PKI_CHAIN_PATH}:/etc/ssl/certs/pki_chain.pem:ro
    environment:
      # timezone inside container
      - TZ

      # necessary Mattermost options/variables (see env.example)
      - MM_SQLSETTINGS_DRIVERNAME
      - MM_SQLSETTINGS_DATASOURCE

      # necessary for bleve
      - MM_BLEVESETTINGS_INDEXDIR

      # additional settings
      - MM_SERVICESETTINGS_SITEURL

```

And I set up nginx like below.

```auto

server {
    listen 80;
    listen [::]:80;
    server_name {domain} chat.{domain};

    location /.well-known/acme-challenge/ {
        root /var/www/html;
        allow all;
    }

    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name {domain} chat.{domain};

    ssl_certificate /etc/letsencrypt/live/{domain}/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/{domain}/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" always;
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-Content-Type-Options "nosniff";

    # Max file upload size
    client_max_body_size 50M;

    location / {
        proxy_pass http://localhost:8065;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_read_timeout 86400;
        proxy_send_timeout 86400;
    }

```

But when I send DM, this error banner appears, and It doesn’t send if I don’t refresh screen.  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/b/bea692de2a10039faa6f4a644fa0f0eecbcf79d9.png)

---

<div class="post-metadata">

**Author:** ![john.oliver](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.oliver/32/6436_2.png) [@john.oliver](https://forum.mattermost.com/u/john.oliver)\
**Post date:** [May 12, 2025, 4:08pm UTC](https://forum.mattermost.com/t/please-check-connection-mattermost-unreachable-if-issue-persists-ask-administrator-to-check-websocket-port-with-docker/23158/2 "2025-05-12T16:08:47Z")

</div>

See if this helps: [Integrations configuration settings - Mattermost documentation](https://docs.mattermost.com/configure/integrations-configuration-settings.html#cors)
