Hello, Bert
Moodle has a chat daemon, it should work on a separate server as it let you specify the server address in chat configuration (moodle/admin/settings.php?section=modsettingchat).
If you manage to do this, please let us know the results.
Regards,
Daniel