Today I installed my own Mattermost server.
Mattermost is an open source alternative to Slack.
Slack has become very popular, but the drawback is that all your data is stored in the cloud. Mattermost solves this by allowing you to self-host your own server.
Mattermost was relativly easy to get running. I went with PostgresSQL as database backend since I experience issues with using MySQL 5.5.
It looks and functions very similar to Slack, however Slack do have some more features like pinning messages in channels, desktop app and mobile clients.
Both Slack and Mattermost are more focused on providing internal communication within an organization, rather than providing instance messaging between friends.