You always need a room to put a door in, but i've seen people using a trick to place a door on the floor/ground, without a room around it. It must be a trick, like the stacking technique? It would be cool to know how to do this so if anyone likes to share, please do! Maybe this has been discussed already elsewhere since several people know how to do it but i'll post this anyway.
Hope this makes sense and thanks in advance for helping!