8. If $x, y, z \in \mathbf{R}_{+}$, and $x^{2}+y^{2}+z^{2}=1$, when $\frac{(z+1)^{2}}{x y z}$ takes the minimum value, $z=$ . $\qquad$
8. $\sqrt{2}-1$.

Notice that,
$$
\begin{array}{l}
\frac{(z+1)^{2}}{2 x y z} \geqslant \frac{(z+1)^{2}}{\left(x^{2}+y^{2}\right) z}=\frac{(z+1)^{2}}{\left(1-z^{2}\right) z} \\
=\frac{z+1}{(1-z) z} \stackrel{u=z+1}{=} \frac{u}{(u-1)(2-u)} \\
=\frac{u}{-u^{2}+3 u-2}=\frac{1}{3-\left(u+\frac{2}{u}\right)} \\
\geqslant \frac{1}{3-2 \sqrt{2}}=3+2 \sqrt{2},
\end{array}
$$

The equality holds if and only if
$$
\left\{\begin{array}{l}
x^{2}+y^{2}+z^{2}=1, \\
x=y, \\
z+1=\frac{2}{z+1} .
\end{array}\right.
$$

Therefore, when $x=y=\sqrt{\sqrt{2}-1}, z=\sqrt{2}-1$, $\frac{(z+1)^{2}}{x y z}$ achieves its minimum value $6+4 \sqrt{2}$.