  Let $\Omega$ be a bounded domain in $R^n$ with $C^2$-smooth boundary of
co-dimension 1, and let $H=-\Delta +V(x)$ be a Schr\"odinger operator on
$\Omega$ with potential V locally bounded. We seek the weakest conditions we
can find on the rate of growth of the potential V close to the boundary which
guarantee essential self-adjointness of H on $C_0^\infty(\Omega)$. As a special
case of an abstract condition, we add optimal logarithmic type corrections to
the known condition $V(x)\geq \frac{3}{4d(x)^2}$, where
$d(x)=dist(x,\partial\Omega)$. The constant 1 in front of each logarithmic term
in Theorem 2 is optimal. The proof is based on a refined Agmon exponential
estimate combined with a well known multidimensional Hardy inequality.
