I just noticed that you started mattermost via docker, while I’m running it as a service on my local machine so I have the config.json. You’ll probably be looking to change these 2 lines and also to map the volumes in MM docker compose file to reflect where to find the SSL certs generated from NPM.
In short, MM must get the correct certs from NPM.
That’s the cause of my 502 bad gateway, hope that helps.