Rocket.Chat Installation
Brief description: Install and configure Rocket.Chat on VM-101 using Snap.
What You'll Learn
- How to verify Rocket.Chat snap is installed
- How to configure Rocket.Chat
- How to set up Nginx reverse proxy
- How to verify the installation
Prerequisites
- [ ] VM-101 created and Ubuntu 24.04 LTS installed
- [ ] Rocket.Chat snap selected during Ubuntu installation (or install manually below)
- [ ] IP address assigned and documented (192.168.192.101)
- [ ] SSH access to VM-101 working
- [ ] 4GB RAM and 30GB disk available
- [ ] Nginx Proxy VM (VM-103) installed and accessible
Estimated Time
30-45 minutes
Snap Already Installed
If you selected Rocket.Chat during Ubuntu installation, the snap is already installed. Skip Step 2 if already done.
Step-by-Step Instructions
Step 1: SSH to Rocket.Chat VM
Step 2: Verify Rocket.Chat Snap
Check if Rocket.Chat snap is installed:
If not installed, install it:
Step 3: Configure Rocket.Chat
Enable HTTPS (required for Rocket.Chat):
sudo snap set rocketchat port=3000
sudo snap set rocketchat https=enabled
sudo snap set rocketchat ssl-certs=enabled
Start Rocket.Chat:
Check status:
Step 4: Wait for Initial Setup
Rocket.Chat takes a few minutes to initialize on first boot. Wait 2-3 minutes then check:
Look for messages indicating the server is ready.
Step 5: Access Rocket.Chat
Open your browser and navigate to:
Or if HTTPS is configured:
Step 6: Initial Admin Setup
- Follow the on-screen wizard to create the first admin user
- Configure your organization details
- Complete the setup
Step 7: Configure Nginx Reverse Proxy
On the Nginx Proxy VM (192.168.192.20), create a configuration file:
Add the following configuration:
upstream rocketchat {
server 192.168.192.101:3000;
}
server {
listen 80;
server_name chat.example.com;
location / {
proxy_pass http://rocketchat;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forward-Proto http;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
}
}
Enable the site:
sudo ln -s /etc/nginx/sites-available/rocketchat /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
Step 8: Update Firewall (if enabled)
On the Rocket.Chat VM, allow traffic from nginx-proxy:
Step 9: Verify Access via Domain
After DNS propagation, access Rocket.Chat via your domain:
Configuration Commands
Common Snap Commands
# Stop Rocket.Chat
sudo snap stop rocketchat
# Start Rocket.Chat
sudo snap start rocketchat
# Restart Rocket.Chat
sudo snap restart rocketchat
# View logs
sudo snap logs rocketchat -f
# Check status
snap services rocketchat
Environment Variables
To set custom environment variables:
Verification
- [ ] Rocket.Chat snap is installed
- [ ] Service is running
- [ ] Accessible at http://192.168.192.101:3000
- [ ] Nginx proxy configured
- [ ] Accessible via domain (chat.example.com)
- [ ] Admin account created
Next Steps
Proceed to Nextcloud Installation if not already installed.