Using SWAG with a chat server e.g. MatterMost or Rocket.chat

I have two servers - one at home and a Digital Ocean droplet - running SWAG. I’ve got loads of services running on both servers and either using the sample files or Google and intuition I’ve got them all proxied through SWAG. I haven’t come across a single problem that I haven’t been able to overcome.

That is until I decided I wanted to set up a family chat server. I’ve tried MatterMost and RocketChat and all I ever get is 502 errors. I can’t work out what the magic ingredient is in the configuration or SWAG and/or the chat servers to get it working.

Has anyone got either of these servers working and can share some advice?

Thanks

Steve