A fully-featured team and group chat application that you can easily selfhost.
chattocorp/chatto has 2,800 GitHub stars.
It currently ranks #41586 daily, #41658 weekly, #42413 monthly by momentum on Trending Repos; its best-ever rank is #4387.