Rocket.Chat Server and Ubuntu 22.04
The guide below describes how to install Rocket.Chat on Ubuntu 22.04 It's easy to install with the Snap package manager.
Feel free to read.
To begin with, we update the package repositories and the system itself.
1 | apt-get update -y |
1 | apt-get upgrade -y |
Let's search for the package in the snap:
1 | sudo snap search rocketchat-server |
And we install it:
1 | sudo snap install rocketchat-server |
We add port to the firewall, if used:
1 | sudo ufw allow 3000 |
We now go in the browser under :
our IP address:3000 and we do the initial configuration and create an administrator account:
To go to the administration panel, go to the address:
1 | http://naszadresip:3000/admin |
if we want our chat to be not only available at our IP address, we will use nginx as a proxy.
We install nginx
1 | sudo apt install nginx |
we create a vhost:
1 | sudo nano /etc/nginx/conf.d/rocketchat.conf |
content:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | server { listen 80; server_name czat.domena.pl; error_log /var/log/nginx/rocketchat_error.log; location / { proxy_pass http://127.0.0.1:3000/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto http; proxy_set_header X-Nginx-Proxy true; proxy_redirect off; } } |
We restart nginx and run it on the system:
1 | sudo systemctl restart nginx |
1 | sudo systemctl enable nginx |