The production of over 800 1.3-GHz superconducting (SC) cavities for the European X-ray Free Electron Laser (EXFEL), the largest in the history of cavity fabrication, has now been successfully completed. In the past, manufacturing of SC resonators was only partly industrialized; the main challenge for the EXFEL production was transferring the high-performance surface treatment to industry. The production was shared by the two companies RI Research Instruments GmbH (RI) and Ettore Zanon S.p.A. (EZ) on the principle of "build to print". DESY provided the high-purity niobium and NbTi for the resonators. Conformity with the European Pressure Equipment Directive (PED) was developed together with the contracted notified body TUEV NORD. New or upgraded infrastructure has been established at both companies. Series production and delivery of fully-equipped cavities ready for cold rf testing was started in December 2012, and finished in December 2015. More than half the cavities delivered to DESY as specified (referred to "as received") fulfilled the EXFEL specification. Further improvement of low-performing cavities was achieved by supplementary surface treatment at DESY or at the companies. The final achieved average gradient exceeded the EXFEL specification by approximately 25%. In the following paper, experience with the 1.3-GHz cavity production for EXFEL is reported and the main lessons learned are discussed.