Download the latest version of Mattermost Server.
wget https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz
Adapt the aforementioned line with the link provided on the [download page]. If you are running into issues, you can grab that link from the GitHub release page.
If you prefer to upgrade to the latest ESR branch, you can grab it from the GitHub release page or the version archive page.