It clearly depends on the space you have however manufacturers often recommend hitting from about 10ft. You will probably be ok from 7ft up to that distance if space is at a premium but it’s worth leaving 1-2ft behind the net also to allow the impact of the ball to be fully absorbed.