Rocket.Chat Nginx reverse proxy setup

Hello

I installed Rocket.Chat with snapd on Ubuntu. I set up Nginx but I’m not sure what I have to do here:

Note: When setting up a reverse proxy in front of your Rocket.Chat server you need to configure Rocket.Chat to use the correct clientAddress. The rate limiter (and maybe other features) will not work properly if this is not done. Set HTTP_FORWARDED_COUNT Environment variable to the correct number of proxies in front of Rocket.Chat. If you are using snap there’s a documentation how to do it here

Can someone please explain like I’m five :slight_smile:

Have you tested your server to see if that is an issue? Do you need to change it? By default Rocket.Chat has a proxy level of 1. If you don’t have another proxy (for load-balancing, etc.) then you don’t need to do anything.

If you needed to update, the link you provided looks straightforward. Simply create a file (like custom.env):
/var/snap/rocketchat-server/common/custom.env

and add a line to that:

HTTP_FORWARDED_COUNT=2

Then use systemctl to restart the service.