You don’t need a domain to have a working Discourse. You can use the IP address of your server if you want.