Any selfhosted instant messaging software for corporate teams?

I’m looking for recommendations for a self-hosted instant messaging platform that would work well for a corporate/engineering team.

The main requirements are good support for private team communication, group channels, file sharing, user management, and ideally integrations with existing tools. We’d also prefer something that we can host and manage ourselves rather than relying entirely on a SaaS provider.

I’m interested in hearing from people who have actually deployed or used these kinds of solutions in a company environment. What software would you recommend, and what have your experiences been with reliability, security, administration, and day-to-day usability?

Any suggestions or lessons learned would be appreciated.