NOVELTY - Energy optimized storage- and fermentation container for energy generation- and energy storage system, comprises (a) an outer wall (19), (b) a bottom (10), (c) at least one intermediate wall (9) inside the container, (d) a transfer device for biomass arranged between the individual chambers, (e) a gas storage chamber (2) for the intermediate storage of biogas produced during fermentation and subsequent fermentation, and (f) a gas outlet (17) for passing the produced biogas into the gas storage chamber.    USE - The energy optimized storage- and fermentation container is useful for energy generation- and energy storage system.    ADVANTAGE - The energy optimized storage- and fermentation container requires no external thermal energy supply. The method is carried out in a single container, and thus it is carried out in a cost efficient and space saving manner.    DETAILED DESCRIPTION - Energy optimized storage- and fermentation container for energy generation- and energy storage system, comprises (a) an outer wall (19), (b) a bottom (10), (c) at least one intermediate wall (9) inside the container, (d) a transfer device for biomass arranged between the individual chambers for transferring the chamber contents from the chamber of the container into an adjacent chamber, (e) a gas storage chamber (2) for the intermediate storage of biogas produced during fermentation and subsequent fermentation, and (f) a gas outlet (17) for passing the biogas, which is produced during the fermentation or subsequent fermentation in the chamber, into the gas storage chamber. The intermediate wall divides the container into at least two chambers, which are optionally provided for hydrolysis, fermentation of biomass, subsequent fermentation and storage of biomass and fermentation residues. The gas storage space is made of a container roof and a base. The gas outlet is arranged in at least one chamber. The gas storage chamber is arranged above at least two chambers and separated from two chambers. At least one heat exchanger device for the biogas, which is discharged from the chamber via the gas outlet, is arranged after the gas outlet of the chamber. A means for storing the gas, which is treated via the heat exchanger device, is provided in the gas storage chamber. The container roof and the base of the gas storage chamber are designed in a gastight manner. An INDEPENDENT CLAIM is also included for optimizing the heat recovery in the fermentation container for energy production- and energy storage systems, comprising initially cooling and dehumidifying the biogas formed during the fermentation through the heat exchanger device, and supplying the gas-tight gas storage chamber for intermediate storage, where the dehumidification, cooling or heating of biogas for the corresponding usage are carried out optionally via additional heat exchange devices, and energy storage and energy usage are carried out by at least one heat storage, at least one hot water storage and/or at least one cold storage.    DESCRIPTION OF DRAWING(S) - The figure shows schematic representation of the energy optimized storage- and fermentation container for energy production- and energy storage system.    Gas storage chamber (2)    Intermediate wall (9)    Bottom (10)    Gas outlet (17)    Outer wall (19)