Search code examples
sslnginxhttpsmattermost

Install free SSL https for port forwarding address


I have mattermost installed in my local server, currently login to it using http://192.168.x.x:8065, and I've setup a ddns port forwarding for it, means that I can login to mattermost using http://xxx.ddns.net:8065 as well.

Now I'm going to install https SSL for it, I tried using self-signed certificate, it seems work fine when I login from my desktop (chrome, firefox, desktop app).

But when it comes to iPhone native app, my mattermost will trigger error message:

    Please check connection, Mattermost unreachable. If issue 
    persists, ask administrator to check WebSocket port.

and now all the messages coming to mattermost will not be shown and no notification at all until we manually refresh the app.

Is there any suggestion on overcoming this issue? Is it because iPhone tried to block any untrusted / self-signed certificate?

Thank you. Best regards, Kong


Solution

  • You are correct that the iPhone does not trust your self-signed certificate out of the box. An easier way to get this working would be to get a free SSL certificate for xxx.ddns.net using a service like Let's Encrypt, which will be trusted out-of-the-box by your iPhone.

    This is especially straightforward to do with Mattermost, as it has built in support for using a Let's Encrypt certificate. You can configure this by following the steps in the documentation here