[Solved] How to setup mattermost behind nginx proxy manager?

how to setup mattermost whitout ssl behind nginx proxy manager that provide ssl certificate with lan forward over http? There is no clear explanation for the proxy and for mattermost.

I was able to get this to mostly work using NGINX proxy manager. The only thing that does not work is under system console > web server > Site URL, the Test Live URL does not work. Saying Test unsuccessful: This is not a valid live URL.

However, everything else works.

I think the problem is similar to the problem I’m having with ghost crm behind a reverse proxy. It’s something to do with the header being wrong, but so far I have not figured out the solution to this problem.

Here’s my setup on NGINX proxy manager.


1 Like

Hi, I just wanted to follow up on this. My hunch about the x-forwarded-proto header was incorrect. I was having a firewall issue that prevented the mattermost server from connecting to the nginx server. After that was fixed, the Test Live URL now works.

Here are my updated nginx server settings.

1 Like

You’re an absolute gem for following up with these solutions/clarifications, Mike! Big cheers! :gem:

1 Like

Unfortunately, it doesn’t work for me. I have configured the NPM exactly as described above. Websocket support is activated. Nevertheless, I keep getting the error on the website:

"websocket error websocket.js:112:24
error { target: WebSocket, isTrusted: true, srcElement: WebSocket, eventPhase: 0, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, timeStamp: 241070, ... }
[1702118709.42] Polling websockets connection for state: undefined"

It seems to have something to do with what is written here in the documentation: There is an extra location configured for the websocket URLs. But I have no idea how this can be configured in NPM. I tried to set it up via the “custom locations” tab in NPM, but that didn’t work either. Any idea how to get rid of these errors/warnings?