The anaerobic digestion of primary and waste activated sludge generates biogas that can be converted into energy to power the operation of a sewage wastewater treatment plant (WWTP). But can the biogas generated by anaerobic sludge digestion ever completely satisfy the electricity requirements of a WWTP with ‘standard’ energy consumption (i.e. industrial pollution not treated, no external organic substrate added)? With this question in mind, we optimized biogas production at Prague's Central Wastewater Treatment Plant in the following ways: enhanced primary sludge separation; thickened waste activated sludge; implemented a lysate centrifuge; increased operational temperature; improved digester mixing. With these optimizations, biogas production increased significantly to 12.5 m3 per population equivalent per year. In turn, this led to an equally significant increase in specific energy production from approximately 15 to 23.5 kWh per population equivalent per year. We compared these full-scale results with those obtained from WWTPs that are already energy self-sufficient, but have exceptionally low energy consumption. Both our results and our analysis suggest that, with the correct optimization of anaerobic digestion technology, even WWTPs with ‘standard’ energy consumption can either attain or come close to attaining energy self-sufficiency.