Zulip
Team Chat
Open-source team chat with topic-based threading, self-hosted on your own Ubuntu or Debian server.
Free self-hostedOpen source · Apache License 2.0
Also offers paid editions — see the detail.

Categories
Entries in our catalogue that can take over from Microsoft Teams. Each one states why, and links the vendor's own source for the claim.
Team Chat
Open-source team chat with topic-based threading, self-hosted on your own Ubuntu or Debian server.
Also offers paid editions — see the detail.
Why it can replace Microsoft Teams: The same vendor page names Microsoft Teams among the apps whose communication patterns Zulip is built to replace. Source