Mattermost is an open source, self-hosted https://jungleworks.com/fugu/
As an alternative to proprietary SaaS messaging, Mattermost brings all your team communication into one place, making it searchable and accessible anywhere. It’s written in Golang and React and runs as a production-ready Linux binary under an MIT license with either MySQL or Postgres.
Slack-compatible, not Slack-limited – Mattermost features rival Slack features, and support a superset of Slack’s incoming and outgoing webhook integrations, including compatibility with existing Slack integrations. From your existing Slack teams, you can import users, public channel history and even theme setting colors into Mattermost.
Mobile and desktop apps, in addition to web – Use Mattermost from your iOS or Android phones and tablets or with installed apps on Windows, Linux and Mac.
Easy to deploy, manage, and upgrade – Mattermost runs as Linux binary, Docker image, and many other forms. Try Mattermost with a one-line Docker install, and many install guides are available. Improvements ship monthly.
Supported by a vibrant community – Use Mattermost with dozens of community integrations and applications, including Jira, IRC, XMPP, Hubot, Giphy, Jenkins, GitLab, Trac, Redmine, SVN, RSS/Atom and many others. Build and share your own apps using Mattermost APIs and drivers.