  Yang-Mills theory is studied at finite temperature within the Hamiltonian
approach in Coulomb gauge by means of the variational principle using a
Gaussian type ansatz for the vacuum wave functional. Temperature is introduced
by compactifying one spatial dimension. As a consequence the finite temperature
behavior is encoded in the vacuum wave functional calculated on the spatial
manifold $\mathbb{R}^2 \times \mathrm {S}^1 (L)$ where $L^{-1}$ is the
temperature. The finite-temperature equations of motion are obtained by
minimizing the vacuum energy density to two-loop order. We show analytically
that these equations yield the correct zero-temperature limit while at infinite
temperature they reduce to the equations of the $2$+$1$-dimensional theory in
accordance with dimensional reduction. The resulting propagators are compared
to those obtained from the grand canonical ensemble where an additional ansatz
for the density matrix is required.
