@afterconnery hard to answer the question given so little details. Do you have a static ip or dynamic one?
If you have a domain and a static ip you should point the sub domain to the ip you run the nextcloud on and then configure nginx (or apache) webserver.