When you went through the first boot questions, did you set the IP as the Mattermost "domain"? If not, then I reckon that's the issue.
From what I gather, Mattermost creates the websocket using the domain set at firstboot. Then the front end tries to connect to the websocket via the address used in your browser address bar.
For what it's worth, I fired up an LXC container and set a test domain of www.example.net. I then added a hosts entry on my local machine pointing to the server's IP. Accessing Mattermost in my browser via the URL set at first boot worked fine and I couldn't reproduce the issue you reported.
Then as per your note about using IP, I reset the Mattermost domain to be the local IP that my server was using (rather than an actual domain), restarted the services and that seemed to work fine too - no websocket errors.
Then it occurred to me that perhaps you had set a dummy domain on firstboot but were connecting in your browser via IP. Then BAM - when I connected to my server via anything other than the "domain" set (called "siteUrl" In Mattermost config) I could reproduce the issue.
So either add the domain to your local PC hosts file - pointing to the server's IP. Or change the domain/url that Mattermost is using to be the IP - and connect via that.
Did you set the IP you're using as the "domain"?
When you went through the first boot questions, did you set the IP as the Mattermost "domain"? If not, then I reckon that's the issue.
From what I gather, Mattermost creates the websocket using the domain set at firstboot. Then the front end tries to connect to the websocket via the address used in your browser address bar.
For what it's worth, I fired up an LXC container and set a test domain of www.example.net. I then added a hosts entry on my local machine pointing to the server's IP. Accessing Mattermost in my browser via the URL set at first boot worked fine and I couldn't reproduce the issue you reported.
Then as per your note about using IP, I reset the Mattermost domain to be the local IP that my server was using (rather than an actual domain), restarted the services and that seemed to work fine too - no websocket errors.
Then it occurred to me that perhaps you had set a dummy domain on firstboot but were connecting in your browser via IP. Then BAM - when I connected to my server via anything other than the "domain" set (called "siteUrl" In Mattermost config) I could reproduce the issue.
So either add the domain to your local PC hosts file - pointing to the server's IP. Or change the domain/url that Mattermost is using to be the IP - and connect via that.
Let me know how you go.