Bad gateway after installing Rocket Chat


I’ve followed the instructions to install Rocket Chat:

It worked fine while I was trying to connect directly via the IP.

Then I’ve set up a subdomain and generated an SSL certificate with the command:

rocketchatctl configure --lets-encrypt --root-url=

But now it doesn’t work anymore, and the page only displays “Bad Gateway”.

I think I’ve done things correctly with the subdomain: an A record and NTS records sending to DigitalOcean.

I have no idea what could be wrong, I’m new to Rocket Chat and DigitalOcean.

Any help is welcome, thanks!

Show comments

Submit an answer
Answer a question...

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
February 2, 2020
Accepted Answer

Hi @leodavesne,

I’ve tried setting up a new Rocket Chat Droplet from the Marketplace and I ran the rocketchatctl command to issue an SSL certificate for my domain. This all worked as expected.

Have you tried checking the status of your Rocket Chat service to see if it is up and running:

sudo systemctl status rocketchat.service 

If it is not running try to start it:

sudo systemctl start rocketchat.service 

Let me know how it goes! Regards, Bobby

I solved the issue by reinstalling nginx.

First check if nginx is present;

sudo ufw app list

If it’s not listed then install;

sudo apt update
sudo apt install nginx

This worked for me. I don’t know what brought up the error though.

Running sudo systemctl status rocketchat.service returns

● rocketchat.service - The Rocket.Chat server                                                                              Loaded: loaded (/lib/systemd/system/rocketchat.service; enabled; vendor preset: enabled)                                Active: failed (Result: exit-code) since Sat 2020-03-14 19:08:49 UTC; 1min 12s ago                                     Process: 1320 ExecStart=/usr/bin/node /opt/Rocket.Chat/main.js (code=exited, status=1/FAILURE)                         Main PID: 1320 (code=exited, status=1/FAILURE)                                                                                                                                                                                                 Mar 14 19:08:49 chat systemd[1]: Started The Rocket.Chat server.                                                        Mar 14 19:08:49 chat rocketchat[1320]: Meteor requires Node v12.0.0 or later.                                           Mar 14 19:08:49 chat systemd[1]: rocketchat.service: Main process exited, code=exited, status=1/FAILURE                 Mar 14 19:08:49 chat systemd[1]: rocketchat.service: Failed with result 'exit-code'.