We show hydrodynamic boundary conditions to be the inherent consequence of the Onsager principle of minimum energy dissipation, provided the relevant effects of the wall potential appear within a thin fluid layer next to the solid wall, denoted the surface layer. The condition that the effect of the surface layer on the bulk hydrodynamics must be independent of its thickness h is shown to imply...