The Signal client and (irregularly) the server are published as open source. You can run your own Signal instance. If you want to complicate your life, of course.
There is an easier way - going with a selfhostable, federated solution. And at least XMPP is now commonly used with an encryption protocol that is based on Signal's.