Short version: no self-hosted app copies Discord perfectly, but each covers a different part of it. Matrix is the most proven, Stoat feels the most like Discord, Spacebar is the most literal clone, and Zulip is the best for organised discussion. Stars and licences are from GitHub on 23 October 2026.

The options at a glance
| Project | Why pick it | Licence |
|---|---|---|
| Matrix (Synapse + Element) | Most mature, federated, end-to-end encryption | AGPL-3.0 |
| Stoat (formerly Revolt) | Closest Discord-style interface | see repo |
| Spacebar | Reimplements the Discord backend | AGPL-3.0 |
| Zulip | Topic threads for focused communities | Apache-2.0 |
Matrix: the safe choice
Matrix is an open, federated protocol: your self-hosted server can talk to every other Matrix server, much like email. Run the Synapse homeserver (~4.7k stars) and give members the Element client (~13.6k stars) on web, desktop and mobile. It supports end-to-end encryption, rooms organised into spaces, and voice and video calls. The trade-off is setup effort and server resources for large communities.
Stoat: Discord's look, self-hostable
Revolt has been renamed Stoat — its repository now lives at stoatchat/stoatchat. Its interface is deliberately close to Discord: servers, channels, roles. It is the easiest jump for a community whose members just want "Discord, but ours." It is smaller and younger than Matrix (about 3.4k stars on the main repository), so check that the features you rely on are there.
Spacebar: the literal reimplementation
Spacebar reimplements the Discord backend in TypeScript, aiming for compatibility with Discord's API. It appeals to tinkerers and anyone wanting to understand or replicate Discord's behaviour. It is an ambitious, community-run project — evaluate its maturity before moving a real community onto it.
Zulip: when discussion matters more than vibes
Zulip organises every conversation into streams and topics, so busy channels do not become an unreadable firehose. It is excellent for open-source projects, study groups and professional communities, and it is Apache-2.0 licensed. It feels less like a hangout than Discord, which is the point.
Choosing by what you need

- Privacy and longevity — Matrix.
- Members who want it to feel like Discord — Stoat.
- Structured, searchable discussion — Zulip.
- Experimenting with Discord compatibility — Spacebar.
If your community is really a team, the self-hosted Slack alternatives guide is a better fit. For the cost case behind self-hosting, read open source vs SaaS: the real cost. Moving your community's files too? See our self-hosted Google Drive alternatives.