You want to build your own small chat system?
The chat server offers you this option. After a short configuration, the chat server is ready to start. Basically, you just have to make sure that your IP is reachable from the outside.
To ensure accessibility there are helpful tools such as Hamachi or DynDNS. However, knowledge of networks and DNS is required.
Then you and your friends / partner can connect to the server via chat client.