- Print
- DarkLight
- PDF
Deploy on Google Compute Engine
- Print
- DarkLight
- PDF
Google Compute Engine (GCE) is a scalable and flexible Infrastructure as a Service (IaaS) solution from the Google Cloud Platform. Deploying Rocket.Chat on GCE gives your organization a robust and reliable communication platform. In this guide, you'll learn how to deploy Rocket.Chat with Google Compute Engine step-by-step.
Preparation steps
Before you begin, make sure you have the following:
A Google Cloud Platform (GCP) account with billing enabled
Deploying Rocket.Chat on Google Compute Engine
Create a compute instance
Log in to Google Cloud Console.
Create a new project and select it.
Click Create a VM instance.
Select a preferred Machine Type (Default: 2vCPU, 1 core , 4GB Memory).
Select a Linux image (Default: Debian/ubuntu).
Allow HTTP and HTTPS Traffic.
Click Create.
To learn more about VM instances, see the official documentation.
Deploy Rocket.Chat
SSH into the VM instance.
Install docker on the instance with this command:
sudo wget -qO- https://get.docker.com/ | sh
Create a container network by running this command:
sudo docker network create chatNetwork
To install a docker image for MongoDB, run this command:
sudo docker run --name mongo --network chatNetwork -d mongo --oplogSize 128 --replSet rs0
SSH into the
mongodb
docker container:
sudo docker exec -it mongo mongosh
Execute the following script to configure the MongoDB replica set:
rs.initiate({ _id: 'rs0', members: [ { _id: 0, host: 'mongo:27017' } ]})
Exit the docker container.
To install a docker image for Rocket.Chat, run the following command:
docker run --name rocketchat -d -p 80:3000 \
--network chatNetwork --env PORT=3000 \
--env ROOT_URL=https://<your-domain> \
--env MONGO_URL=mongodb://mongo:27017/rocketchat \
--env MONGO_OPLOG_URL=mongodb://mongo:27017/local rocket.chat:latest
Replace the
<your-domain>
with your domain name.Ensure that the domain is pointing to your server IP address.
Rocket.Chat is currently up and running on the compute engine. To access it, open a web browser and enter the instance's external IP address. You can also access your workspace from http://<your-domain>.
To confirm that Rocket.Chat container is running on the compute engine, run this command:
sudo docker ps -a
If you want the containers to start automatically every time the instance reboots, configure the startup script for the instance with the appropriate docker commands.
Great job on setting up Rocket.Chat on Google Compute Engine! Now you have a secure and scalable platform for collaboration with real-time communication, monitoring, and backups. Expect better teamwork and productivity!