1

I'm trying to set up a Rocket Chat server on a micro GCE instance (micro, Always-Free). I've installed Rocket.Chat via snapd with no problems (SSH access). The service is up and running, and the external IP is ping-able.

The port that RocketChat uses is 3000, and I've created the needed firewall rules:

inbound - all instances - IP Range 0.0.0.0/0 - tcp:3000 - allow - priority 1
inbound - all instances - IP Range 0.0.0.0/0 - udp:3000 - allow - priority 2

However, when I try to connect via browser I get a "refused". What am I missing?

Lucas Famelli
  • 1,565
  • 2
  • 15
  • 23

1 Answers1

-1

You need to add firewall rule on GCP to allow ingress port 3000 (tcp and udp) to your VPC Network where is your GCE instance, you can add firewall rule by using the gcloud command as well see below:

gcloud compute firewall-rules create [name]  --action allow --rules tcp:3000,udp:3000 --direction INGRESS --network [VPC_NAME]

I succeeded to create a RocketChat with snapd using micro instance with Allow HTTP traffic enabled (it was a Debian) Did follow the step here

sudo apt-get install snapd
sudo snap install rocketchat-server

Then checked the status of the server

sudo service snap.rocketchat-server.rocketchat-server status

Output:

$ sudo service snap.rocketchat-server.rocketchat-server status
        ● snap.rocketchat-server.rocketchat-server.service - Service for snap application rocketchat-server.rocketchat-server
       Loaded: loaded (/etc/systemd/system/snap.rocketchat-server.rocketchat-server.service; enabled; vendor preset: enabled)
       Active: active (running) since Wed 2019-01-09 21:14:25 UTC; 14min ago
     Main PID: 6148 (startRocketChat)
        Tasks: 12 (limit: 4915)
       CGroup: /system.slice/snap.rocketchat-server.rocketchat-server.service
               ├─6148 /bin/bash /snap/rocketchat-server/1356/bin/startRocketChat
               └─6165 node /snap/rocketchat-server/1356/main.js

    Jan 09 21:14:44 rocketchat rocketchat-server.rocketchat-server[6148]: ➔ |  Rocket.Chat Version: 0.72.3            |
    Jan 09 21:14:44 rocketchat rocketchat-server.rocketchat-server[6148]: ➔ |       NodeJS Version: 8.11.3 - x64      |
    Jan 09 21:14:44 rocketchat rocketchat-server.rocketchat-server[6148]: ➔ |             Platform: linux             |
    Jan 09 21:14:44 rocketchat rocketchat-server.rocketchat-server[6148]: ➔ |         Process Port: 3000              |
    Jan 09 21:14:44 rocketchat rocketchat-server.rocketchat-server[6148]: ➔ |             Site URL: http://localhost  |
    Jan 09 21:14:44 rocketchat rocketchat-server.rocketchat-server[6148]: ➔ |     ReplicaSet OpLog: Enabled           |
    Jan 09 21:14:44 rocketchat rocketchat-server.rocketchat-server[6148]: ➔ |          Commit Hash: 65747ce814        |
    Jan 09 21:14:44 rocketchat rocketchat-server.rocketchat-server[6148]: ➔ |        Commit Branch: HEAD              |
    Jan 09 21:14:44 rocketchat rocketchat-server.rocketchat-server[6148]: ➔ |                                         |
    Jan 09 21:14:44 rocketchat rocketchat-server.rocketchat-server[6148]: ➔ +-----------------------------------------+

The curl localhost:3000 was successful but not the external IP curl [EXTERNAL_IP]:3000.

Then Added the Firewall rule above (using the gcloud command or the console it's up to you), and I were able then to curl my external IP and was able to browser using my EXTERNAL_IP:3000 for the setup wizard.

You can also deploy Rocket.Chat with docker see this documentation

Alioua
  • 1,663
  • 1
  • 9
  • 18