Question

Bad gateway after installing Rocket Chat

Hi,

I’ve followed the instructions to install Rocket Chat: https://marketplace.digitalocean.com/apps/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=https://chat.yourcompany.com --letsencrypt-email=admin@yourcompany.com

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


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'.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.