What does it cost to run a self-hosted Mattermost server?

Please read this, as it contains your answer (in a nutshell, yes, a Raspberry Pi 4 is sufficient, but use Ubuntu 18.04 or 19.10, not 32-bit Raspbian).