Clean energy farming is the agricultural activity to improve an efficiency of agricultural energy use and to replace fossil fuels. This study was carried out to establish the clean energy farming system in the controlled cultivation of vegetable crop (cucumber) adopting the biogas production facility. In order to design the clean energy farming system, mass and energy balance was analyzed between the controlled cultivation system and the biogas production facility. Net yearly heating energy demands ($E_{YHED}$) of forcing and semi-forcing cultivation types were 48,697 and $13.536Mcal;10^{-1}$ in the controlled cultivation of vegetable cucumber. To cover these $E_{YHED}$, the pig slurry of 511 and $142m^3;10a^{-1}$ (biogas volume of 9,482 and $2,636Nm^3;10a^{-1}$, respectively, as 60% methane content) were needed in forcing and semi-forcing cultivation types. The pig slurry of $511m^3;10a^{-1}$ caused N 1,788, $P_2O_5$ $511kg;10a^{-1}$ in the forcing cultivation type, and the pig slurry of $142m^3;10a^{-1}$ caused N 497, $P_2O_5$ $142kg;10a^{-1}$ in the semi-forcing cultivation type. The daily heating energy demand ($E_{i,DHED}$) by the time scale analysis showed the minimum $E_{i,DHED}$ of $7.7Mcal;10a^{-1};day^{-1}$, the maximum $E_{i,DHED}$ of $515.1Mcal;10a^{-1};day^{-1}$, and the mean $E_{i,DHED}$ of 310.2 in the forcing cultivation type. And the minimum $E_{i,DHED}$, the maximum $E_{i,DHED}$, and the mean $E_{i,DHED}$ were 5.3, 258.0, and $165.1Mcal;10a^{-1};day^{-1}$ in the semi-forcing cultivation type, respectively. Input scale of biogas production facility designed from the mean $E_{i,DHED}$ were 3.3 and $1.7m^3;day^{-1}$ in the forcing and the semi-forcing cultivation type. The maximum $E_{i,DHED}$ gave the input scale of 5.4 and $2.7m^3;day^{-1}$ in the forcing and the semi-forcing cultivation type.