# Treafik cannot negotiate ALPN

**URL:** <https://forums.rocket.chat/t/treafik-cannot-negotiate-alpn/22898>\
**Category:** Community Support\
**Created:** [May 29, 2026, 10:26am UTC](https://forums.rocket.chat/t/treafik-cannot-negotiate-alpn/22898 "2026-05-29T10:26:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mklooster](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mklooster](https://forums.rocket.chat/u/mklooster)\
**Post date:** [May 29, 2026, 10:26am UTC](https://forums.rocket.chat/t/treafik-cannot-negotiate-alpn/22898/1 "2026-05-29T10:26:12Z")

</div>

### Description

We recently installed rocketchat using docker compose. We used this guide: [Deploy with Docker and Docker Compose](https://docs.rocket.chat/docs/deploy-with-docker-docker-compose) . However we were not able to get HTTPS working using treafik. It is unable to generate a certificate using Let’s Encrypt.

The Treafik logs are showing the following the following error:  
`2026-05-28T21:08:06Z ERR Unable to obtain ACME certificate for domains error=“unable to generate a certificate for the domains [``mydomain.com``]: error: one or more domains had a problem:\n[``mydomain.com``] invalid authorization: acme: error: 403 :: urn:ietf:params:acme:error:unauthorized :: Cannot negotiate ALPN protocol "acme-tls/1" for tls-alpn-01 challenge\n” ACME CA=https://acme-v02.api.letsencrypt.org/directory acmeCA=https://acme-v02.api.letsencrypt.org/directory domains=[“``mydomain.com``”] providerName=le.acme routerName=rocketchat@file rule=Host(``mydomain.com``)`

We’ve tried changing the .env config file, but we are not able to fix the isue.

### Server Setup Information

- Version of Rocket.Chat Server: 8.4.0
- Operating System: Ubuntu 24.04.4 LTS
- Deployment Method: Docker
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version:
- MongoDB Version:
- Proxy: Treafik
- Firewalls involved: None

### Any additional Information

We’ve not changed the compose.treafik.yml.

This is our .env file:

```auto
#!/bin/sh

Change these

REG_TOKEN=
DOMAIN=mydomain.com
ROOT_URL=https://mydomain.com
RELEASE=8.4.0

Change to true after you set your domain and valid lets encrypt email

LETSENCRYPT_ENABLED=true
LETSENCRYPT_EMAIL=myemail@mydomain.com
TRAEFIK_PROTOCOL=https

Prometheus

PROMETHEUS_RETENTION_SIZE=15GB
PROMETHEUS_RETENTION_TIME=15d

default prometheus port (9090) conflicts with cockpit in centos

PROMETHEUS_PORT=9000

Grafana

Set to empty string to use a subpath

GRAFANA_DOMAIN=grafana.mydomain.com

set to /grafana to use from a subpath

GRAFANA_PATH=/grafana

GRAFANA_ADMIN_PASSWORD=rc-admin
GRAFANA_HOST_PORT=5050
GRAFANA_BIND_IP=127.0.0.1

Traefik ports

TRAEFIK_HTTP_PORT=80
TRAEFIK_DASHBOARD_PORT=8080
TRAEFIK_HTTPS_PORT=443

MongoDB

MONGODB_BIND_IP=127.0.0.1
MONGODB_PORT_NUMBER=27017

Nats

NATS_PORT_NUMBER=4222
NATS_BIND_IP=127.0.0.1

```

---

<div class="post-metadata">

**Author:** ![reetp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/reetp/32/5546_2.png) [@reetp](https://forums.rocket.chat/u/reetp)\
**Post date:** [May 29, 2026, 7:26pm UTC](https://forums.rocket.chat/t/treafik-cannot-negotiate-alpn/22898/2 "2026-05-29T19:26:02Z")

</div>

Try searching your error:

“invalid authorization: acme: error: 403”

Then fix your webserver/reverse proxy.

That’s your problem. Letsencrypt can’t see the right files/dirs. Your webserver logs will show you where the errors are.

---

<div class="post-metadata">

**Author:** ![mklooster](https://avatars.discourse-cdn.com/v4/letter/m/ecd19e/32.png) [@mklooster](https://forums.rocket.chat/u/mklooster)\
**Post date:** [June 1, 2026, 7:49pm UTC](https://forums.rocket.chat/t/treafik-cannot-negotiate-alpn/22898/3 "2026-06-01T19:49:39Z")

</div>

Hi,

We’ve managed to fix the issue. There was a wrong DNS setting. The AAAA was not set correct.

Thank you for your help!
