your server on your local machine should be set as an internet server. you will also need to forward your ports.
a better way to do this would be to run a server and get it hosted professionally as your machine will struggle to both run the server, and the client portion.