Rotating Rayleigh–Bénard convection, the flow in a rotating fluid layer heated from below and cooled from above, is used to analyse the transition to the geostrophic regime of thermal convection. In the geostrophic regime, which is of direct relevance to most geo- and astrophysical flows, the system is strongly rotating while maintaining a sufficiently large thermal driving to generate turbulence. We directly simulate the Navier–Stokes equations for two values of the thermal forcing, i.e. Ra = 1010 and Ra = 5 × 1010, at constant Prandtl number Pr = 1, and vary the Ekman number in the range Ek = 1.3 × 10-7 to Ek = 2 × 10-6, which satisfies both requirements of supercriticality and strong rotation. We focus on the differences between the application of no-slip versus stress-free boundary conditions on the horizontal plates. The transition is found at roughly the same parameter values for both boundary conditions, i.e. at Ek ≈ 9 × 10-7 for Ra = 1 × 1010 and at Ek ≈ 3 × 10-7 for Ra = 5 × 1010. However, the transition is gradual and it does not exactly coincide in Ek for different flow indicators. In particular, we report the characteristics of the transitions in the heat-transfer scaling laws, the boundary-layer thicknesses, the bulk/boundary-layer distribution of dissipations and the mean temperature gradient in the bulk. The flow phenomenology in the geostrophic regime evolves differently for no-slip and stress-free plates. For stress-free conditions, the formation of a large-scale barotropic vortex with associated inverse energy cascade is apparent. For no-slip plates, a turbulent state without large-scale coherent structures is found; the absence of large-scale structure formation is reflected in the energy transfer in the sense that the inverse cascade, present for stress-free boundary conditions, vanishes.