A facility provided with an anaerobic reactor and an aerobic reactor for treating a daily volume of livestock waste water, comprising a) a collecting basin configured to continually collect and stir raw livestock liquid wastes; b) a pretreatment channel having an inlet end and an outlet end, configured to contain at least said daily volume of waste water, connected at said inlet end with said collecting basin and configured to accept said raw wastes, which flow through the channel and form a pretreated waste water while allowing for partial settling of dispersed solids and enriching the lower part of the channel with said solids relatively to the upper part; c) an anaerobic sequencing batch reactor (ASBR, 3) connected with said channel via a connecting pipe at said outlet end and configured to accept said pretreated waste water from the upper part of said channel in separate batches through the connecting pipe, each batch allowed to react in the ASBR and partially settle, forming anaerobically treated waste water being enriched with solids in the lower part of the ASBR relatively to the upper part, wherein a portion of said anaerobically treated waste water from said lower part is fed to said channel at said inlet end where it combines with said raw wastes, said connecting pipe being branched to enable a part of said pretreated waste water to flow to an aerobic reactor; d) an aerobic sequencing batch reactor (SBR, 4) connected with said ASBR via the connecting pipe and configured to accept said anaerobically treated water from the upper part of said ASBR in separate batches, each batch allowed to react in the SBR and partially settle, forming aerobically treated waste water being enriched with solids in the lower part of the SBR relatively to the upper part, wherein a portion of said aerobically treated waste water from said lower part is fed back to said ASBR, and said aerobically treated water from the upper part being removed as a safe water product, the SBR connected to said connecting pipe, which connects said channel with said ASBR, which pipe is provided with a valve enabling to divide the flow of said pretreated waste water from the upper part of said channel between said ASBR and said SBR; e) a compost basin configured to being fed with cellulose based solid waste, connected with said pretreatment channel at said outlet end and configured to accept said pretreated waste water from the lower part of said channel, the basin provided with mixing means, thereby providing a quality compost; and f) transfer means for transferring the treated liquid from said collector, via said channel and said anaerobic reactor, into said aerobic reactor and to said compost basin, wherein said means comprise pumps and gravity driven means; wherein said daily volume of livestock waste water is converted to a quality compost and safe water for release into municipal system or for use in agriculture. a) a collecting basin configured to continually collect and stir raw livestock liquid wastes; b) a pretreatment channel having an inlet end and an outlet end, configured to contain at least said daily volume of waste water, connected at said inlet end with said collecting basin and configured to accept said raw wastes, which flow through the channel and form a pretreated waste water while allowing for partial settling of dispersed solids and enriching the lower part of the channel with said solids relatively to the upper part; c) an anaerobic sequencing batch reactor (ASBR, 3) connected with said channel via a connecting pipe at said outlet end and configured to accept said pretreated waste water from the upper part of said channel in separate batches through the connecting pipe, each batch allowed to react in the ASBR and partially settle, forming anaerobically treated waste water being enriched with solids in the lower part of the ASBR relatively to the upper part, wherein a portion of said anaerobically treated waste water from said lower part is fed to said channel at said inlet end where it combines with said raw wastes, said connecting pipe being branched to enable a part of said pretreated waste water to flow to an aerobic reactor; d) an aerobic sequencing batch reactor (SBR, 4) connected with said ASBR via the connecting pipe and configured to accept said anaerobically treated water from the upper part of said ASBR in separate batches, each batch allowed to react in the SBR and partially settle, forming aerobically treated waste water being enriched with solids in the lower part of the SBR relatively to the upper part, wherein a portion of said aerobically treated waste water from said lower part is fed back to said ASBR, and said aerobically treated water from the upper part being removed as a safe water product, the SBR connected to said connecting pipe, which connects said channel with said ASBR, which pipe is provided with a valve enabling to divide the flow of said pretreated waste water from the upper part of said channel between said ASBR and said SBR; e) a compost basin configured to being fed with cellulose based solid waste, connected with said pretreatment channel at said outlet end and configured to accept said pretreated waste water from the lower part of said channel, the basin provided with mixing means, thereby providing a quality compost; and f) transfer means for transferring the treated liquid from said collector, via said channel and said anaerobic reactor, into said aerobic reactor and to said compost basin, wherein said means comprise pumps and gravity driven means;