I initially wrote this after getting everything described set up. Since then I have learned the hard way that Matrix is actually broken in several important aspects and I do not recommend self-hosting it. I am leaving the Gist up for reference and in the off-chance it may help others.
There are two main free and open-source technologies today for real-time