Mattermost
Self-hosted serverTeam chat with channels, threads and calls.
You give upThe closest thing to Slack. The free open-source Team Edition has no single sign-on and is capped at 250 users. Mattermost 12 (Oct 16) removed the built-in Slack importer, so moving over now goes through the separate mmetl tool, which the docs list for the Entry and paid plans, not Team Edition. We couldn't confirm whether it still works on Team Edition. Slack Free and Pro exports include only public channels.
Imports your data: Slack exports through the separate mmetl tool, which Mattermost's docs list for the Entry and paid plans
Runs on your own Linux server. Setup docs are on mattermost.com.