Abstract
A new approach based on the nonequilibrium statistical operator is presented that makes it possible to take into account the inhomogeneous particle distribution and provides obtaining all thermodynamic relations of self-gravitating systems. The equations corresponding to the extremum of the partition function completely reproduce the well-known equations of the general theory of relativity. Guided by the principle of Mach's "economing of thinking" quantitatively and qualitatively, is shown that the classical statistical description and the associated thermodynamic relations reproduce Einstein's gravitational equation. The article answers the question of how is it possible to substantiate the general relativistic equations in terms of the statistical methods for the description of the behavior of the system in the classical case.