Setup discourse.domain.com with main site at domain.com

I have both on the same server & therefore the same IP. Is that the problem, do I need two servers for this kind of setup? The documentation said forum.domain.com should have same IP as domain.com.

Is there a way to do this without using 2 servers? My client probably doesn’t want to pay to run a 2nd server for what he views as one website.