Mike XMPP and IRC run on absolutely anything. The lighter Matrix servers might, but Synapse is an utter hog. I ran a Synapse server for about 2 years and my server absolutely chugged.
If you do want to run a Matrix server, I highly recommend Slavi Pantaleev’s excellent Ansible playbook. It enables you to configure everything in Docker containers and choose Synapse, Dendrite, or Conduit in addition to a web client. I used this back when it was Synapse-only and it was honestly the only reasonable way for an individual to get it done.