  We quantize a real massive Klein-Gordon field in curved spacetimes within the
general boundary formulation. The vacuum wave function is given by a Gaussian
in the Schr\"odinger representation and we study the general structure of the
operator appearing in the Gaussian. We show that it obeys a Riccati equation
and we provide the general solution.
