Based on the Atiyah-Patodi-Singer index formula, we construct an obstruction to positive scalar curvature metrics with mean convex boundaries on spin manifolds of infinite K-area. We also characterize the extremal case. Next we show a general deformation principle for boundary conditions of metrics with lower scalar curvature bounds. This implies that the relaxation of boundary conditions often induces weak homotopy equivalences of spaces of such metrics. This can be used to refine the smoothing of codimension-one singularites a la Miao and the deformation of boundary conditions a la Brendle-Marques-Neves, among others. Finally, we construct compact manifolds for which the spaces of positive scalar curvature metrics with mean convex boundaries have nontrivial higher homotopy groups.