Context. Kepler-17 is a G2V sun-like star accompanied by a transiting planet with a mass of ≈2.5 Jupiter masses and an orbital period of 1.486 d, recently discovered by the Kepler space telescope. This star is highly interesting as a young solar analogue. It is also a good candidate for a test of the tidal theories for solar-like stars. Aims. We used about 500 days of high-precision, high-duty-cycle optical photometry collected by Kepler to study the rotation of the star and the evolution of its photospheric active regions.Methods. We applied a maximum-entropy light curve inversion technique to model the flux rotational modulation induced by active regions that consist of dark spots and bright solar-like faculae with a fixed area ratio. Their configuration was varied after a fixed time interval to take their evolution into account. Active regions were used as tracers to study stellar differential rotation, and planetary occultations were used to constrain the latitude of some spots. Results. Our modelling approach reproduces the light variations of Kepler-17 with a standard deviation of the residuals comparable with the precision of Kepler photometry. We find several active longitudes where individual active regions appear, evolve, and decay with lifetimes comparable to those observed in the Sun, although the star has a spotted area ≈10−15 times larger than the Sun at the maximum of the 11-yr cycle. Kepler-17 shows a solar-like latitudinal differential rotation, but the fast spot evolution prevents a precise determination of its amplitude. Moveover, the star shows a cyclic variation of the starspot area with a period of 47.1 ± 4.5 d, particularly evident during the last 200 days of the observations, similar to the solar Rieger cycles. Possible effects of the close-in massive planet on stellar photospheric activity cannot be excluded, but require a long-term monitoring to be unambiguously detected.