Rocket.Chat is an open-source team communication platform that allows you to communicate via chat, video, and audio. In this guide, we will walk you through the installation of Rocket.Chat Server on Rocky Linux 8. Whether you are deploying it on a local server or using a Windows VPS UK, this tutorial covers all the necessary steps.
Step 1: Update Your System
Before installing Rocket.Chat, ensure your system is up to date. Run the following commands:
sudo dnf update -y
Keeping your system updated is crucial for security and performance, whether you're setting it up locally or on a VPS Windows Servers platform.
Step 2: Install Required Dependencies
Rocket.Chat requires Node.js and MongoDB. First, install the necessary dependencies:
sudo dnf install -y curl wget
Step 3: Install MongoDB
Import the MongoDB public GPG key:
sudo rpm --import https://www.mongodb.org/static/pgp/server-4.4.asc
Create a new MongoDB repository file:
echo "[mongodb-org-4.4]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/rocky/8/mongodb-org/4.4/x86_64/
gpgcheck=1
enabled=1
gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc" | sudo tee /etc/yum.repos.d/mongodb-org-4.4.repo
Now install MongoDB:
sudo dnf install -y mongodb-org
Start and enable the MongoDB service:
sudo systemctl start mongod
sudo systemctl enable mongod
Step 4: Install Node.js
To install Node.js, add the NodeSource repository:
curl -fsSL https://rpm.nodesource.com/setup_14.x | sudo bash -
Now install Node.js:
sudo dnf install -y nodejs
Step 5: Install Rocket.Chat
Create a directory for Rocket.Chat and navigate into it:
mkdir ~/Rocket.Chat
cd ~/Rocket.Chat
Download the latest Rocket.Chat release:
wget https://releases.rocket.chat/latest/download -O rocket.chat.tar.gz
Extract the downloaded file:
tar -zxvf rocket.chat.tar.gz
Navigate to the extracted directory:
cd bundle
Step 6: Start Rocket.Chat
To start Rocket.Chat, you will first need to configure the environment:
export PORT=3000
export ROOT_URL=http://your_domain_or_IP:3000
export MONGO_URL=mongodb://localhost:27017/rocketchat
export MAIL_URL=smtp://user:pass@smtp.mailgun.org:587/
Now, you can start Rocket.Chat:
node main.js
Make sure to replace your_domain_or_IP
with your actual domain or server IP, and configure the MAIL_URL
with your SMTP details.
Step 7: Access Rocket.Chat
Open your web browser and navigate to:
http://your_domain_or_IP:3000
You should see the Rocket.Chat setup page. Follow the on-screen instructions to complete the setup.
Step 8: Configure Firewall (Optional)
If you are using a firewall, you may need to allow traffic on the port Rocket.Chat is using:
sudo firewall-cmd --permanent --add-port=3000/tcp
Then reload the firewall rules:
sudo firewall-cmd --reload