Since Discord has decided to set itself on fire you might be looking for an alternative. Fluxer is open source (AGPL), selfhostable and based in Sweden. But maybe wait a while before you try to install the server yourself because the dev writes on github:
I know it’s hard to resist, but please wait a little longer before you dive deep into the current codebase or try to set up self-hosting. I’m aware the current stack isn’t very lightweight. In the next update, self-hosting should be straightforward, with a small set of services: Fluxer Server (TypeScript) using SQLite for persistence, Gateway (Erlang), and optionally LiveKit for voice and video.
The developer hosted instance has a Nitro-like premium tier for their service named Plutonium, if you selfhost you get all the premium features for free.
Fluxer is not federated (yet), but according to the website, federation is planned in the near(-ish) future. Furthermore the service is a bit spotty at the moment as they are fighting with an unusually big influx of new users.



The problem is to move the users over. People aren’t willing to change
This one REALLY is like discord, and I’d say with the incoming ID-checks people will be more open to change
I’m a bit worried it’s too much like discord. I expect if it got popular, discord may fight it
Worst case if it gets to that point is it’ll need a reskin which would be fine tbh