The synchronization of coupled oscillators is a phenomenon found throughout nature. Mechanical oscillators are paradigmatic among such systems, but realising them at the nanoscale is challenging. We report synchronization of the mechanical dynamics of a pair of optomechanical crystal cavities that are intercoupled with a mechanical link and support independent optical modes. In this regime they oscillate in anti-phase, which is in agreement with the predictions of our numerical model that considers reactive coupling. Finally, we show how to temporarily disable synchronization of the coupled system by actuating one of the cavities with a heating laser, so that both cavities oscillate independently. Our results can be upscaled to more than two cavities and are thus the first step towards realizing integrated networks of synchronized optomechanical oscillators. Such networks promise unparalleled performances for time-keeping and sensing purposes and unveil a new route for neuromorphic computing applications.