The Pixel Luminosity Telescope is a silicon pixel detector dedicated to luminosity measurement at the CMS experiment. It consists of 48 silicon sensor planes arranged into 16 "telescopes" of three planes each, with eight telescopes arranged around the beam pipe at either end of the CMS detector, outside the pixel endcap at a distance of approximately 1.75 m from the interaction point. The planes in a telescope are positioned such that a particle coming from the interaction point passing through a telescope will produce a hit in each of the three planes of the telescope. The instantaneous luminosity is measured from this rate of triple coincidences, using a special "fast-or" readout at the full bunch-crossing rate of 40 MHz, allowing for real-time, high-precision luminosity information to be provided to CMS and the LHC. The full pixel information, including hit position and charge, is read out at a lower rate and can be used for studies of systematic effects in the measurement. We present the commissioning, calibration, operational history, and performance of the detector during Run 2 (2015-2018) of the LHC, together with lessons learned for future projects. The detector has been rebuilt for LHC Run 3, with one of the telescopes using prototype CMS phase-2 n-in-p sensors of 150 μm thickness. First performance results of the new detector will also be shown.