The issue with the Android app not connecting to the server is a known issue: Android app can't connect if server isn't listening on IPv6 · Issue #24703 · mattermost/mattermost · GitHub
It’s also likely to happen to a lot of people since the recommended nginx configuration only supports IPv4:
server {
listen 443 ssl http2;
Since the Android app cannot connect to IPv4 and needs IPv6, you need to enable IPv6 support in your nginx config like this:
server {
listen [::]:443 ssl http2;
That change applied to my nginx config made the Android app connect to my mattermost server!