You can set up a server on a VPS somewhere, or run one on your own network on a VM.
http://www.ubuntu.com/download/server
https://www.digitalocean.com/community/tutorials/how-to-install-ejabberd-xmpp-server-on-ubuntu
https://candy-chat.github.io/candy/
https://github.com/zwily/vagrant-ejabberd-cluster/blob/master/Vagrantfile