in close quarters
in a small area together with others.
Living in close quarters, college students frequently catch colds from each other.
Etymology: based on the literal meaning of quarters (= a place to live or stay)
Cambridge English Idioms Dictionary