Docker-compose with letsencrypt


I have successfully installed rocket chat, but it uses now http and port 3000
I have created a letsencrypt certificate in nginx-proxy companion.

How can I combine both to use https and not anymore port 3000?

Server Setup Information

  • Version of Rocket.Chat Server: latest
  • Operating System: Ubuntu
  • Deployment Method: docker-compose
  • Number of Running Instances:
  • DB Replicaset Oplog:
  • NodeJS Version:
  • MongoDB Version:
  • Proxy: nginx
  • Firewalls involved:

Hi, @rwiplinger you need to bind the Rocket.Chat service with a **domain ** first, the SSL certificate can only work for the domain.

How do I do that? I assume that’s in the docker-compose.yml, but I don’t recognize it.

I think you can divide the work into two parts:

i) Edit nginx configration file to make sure you can access the Rocket.Chat service via domain. Below is an example of the reverse proxy configration:
location /
proxy_pass http://localhost:3000; # necessary
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
i) Install SSL certificate ()

Hope it can be helpful :slight_smile:

1 Like