-
Hello, Running NPM has been a treat, generally I can get it all to work as I want to so it is fun tinkering with stuff. There is one thing I am stuck with and that is configuring Mattermost with NPM. I have a VPS where all sites run in Docker containers and they are all managed via NPM for their hostname/SSL. So also Mattermost and it works for the most part. There is just an issue with the websocket it seems because the app tells me that notifications cannot be received from the server. The documentation from Mattermost has code for how Nginx should be configured. Now with NPM it works a little different as far as I can tell. The documentation has this config block for websockets:
Now when I put this in the Advanced tab the site won't even come up. Not a real surprise but this is where I am stuck. How should I configure this so it works with NPM? I do have the Websockets turned on for this host but I guess that alone is not enough. Any help will be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 5 replies
-
Hi, this is what I have in my advanced tab:
And I have one custom location: ^~ /api/v1/streaming location: ip of mastodon server ip: 4000 This was all I needed, Hope this Helps Gerrit |
Beta Was this translation helpful? Give feedback.
-
Did you find a working solution? |
Beta Was this translation helpful? Give feedback.
-
@GerritKuilder Thank you for your input. However I think this is not related to the websocket part. @BobWs No, I have not solved this issue yet and am just dealing with it. Just not enough time to dig deeper into this. It seems there is no easy solution for this at least. |
Beta Was this translation helpful? Give feedback.
-
Hello @BobWs Thank you for your offer to help. Actually Mattermost works fine, it is just that the Mattermost app on Android keeps telling me this:
In practice this means, I need to manually check for new messages. It would be nice to get notified :) While looking into this, that is when I ended up with the websocket documenation that I mentioned in my opening post. You are suggesting to add the AllowCorsFrom, so I set this in the config: However the notice remains in the app. Any other suggestions? |
Beta Was this translation helpful? Give feedback.
-
Well I was having the same message when I updated my server to version 8.* and the CORS suggestion worked for me. Although I must say I don't use Mattermost on Android, but I guess the problem was the same for IOS and Android.
|
Beta Was this translation helpful? Give feedback.
-
Hello @BobWs At the time I was running version 7.x and did not realize there was a newer version. So I updated to 8.0 and the issue remains, I just updated to version 8.1 and as you can guess, the issue still remains. You mentioned the logs and this made me go through the settings again and I noticed tha tthe Turning it on, only gives the option to use the push-test server of Mattermost. I have that turned on but see no change for now but let's see if things will change. |
Beta Was this translation helpful? Give feedback.
-
@BobWs So I have been giving this some time to see if it needed time to start working but to no avail :) Now I wonder if I need to open up more ports to the Mattermost container. Currently I am only redirecting to port 8065. Do you have any custom locations set up? |
Beta Was this translation helpful? Give feedback.
-
Hi @roland-d |
Beta Was this translation helpful? Give feedback.
-
Hello @BobWs Thank you for sticking with this. These settings I had not set yet. Rather, I never changed the default. Now changing it to what you have I am actually getting notified in all possible ways. The server in the app still has the red triangle saying that Once more thank you for all your help. |
Beta Was this translation helpful? Give feedback.
-
@BobWs You are the hero of the day :) 🦸 The triangle is gone now as well. Thank you very much for seeing this trough. |
Beta Was this translation helpful? Give feedback.
Hi @roland-d no problem, good to hear that it is working now!
About the warning triangle I had that too, to get rid of that you just need to reinstall the (mobile)app(s) and that will re-register the push-notification server and if I'm right the warning triangle should be gone.