This work continues the construction of a recently proposed model of dark matter stars. In this model, dark matter quanta are sterile massless particles that are emitted from the central regions of the galaxy in the radial direction. As a result, at large distances r from the center of the galaxy, the mass density of dark matter has the form ρ ∼ r −2 , in contrast to the homogeneous model ρ = Const. In the cosmological context, the homogeneous model with massless particles corresponds to the radiation epoch of the expansion of the universe, while the proposed inhomogeneous model turns out to be equivalent to ΛCDM. In this paper, scenarios will be considered in which the radial emission of dark matter is brought into hydrostatic equilibrium with a uniform background. It is shown that solutions exist if the uniform background has an equation of state typical for dark energy. Thus, this model describes a phase transition from dark matter inside the galaxy to dark energy outside of it. The specific mechanism for such a transition could be Bose-Einstein condensation. In addition, the question of what happens if dark matter particles are not sterile, for example, are photons of the Standard Model, is considered.