The Casimir force was predicted in 1948 as a force arising between macroscopic bodies from the zero-point energy. At finite temperatures, it has been shown that a thermal Casimir force exists due to thermal rather than zero-point energy and there are a growing number of experiments that characterize the effect at a range of temperatures and distances. In addition, in the rapidly evolving field of cavity optomechanics, there is an endeavour to manipulate phonons and enhance coherence. We demonstrate a way to realize a Casimir spring and engineer dilution in macroscopic optomechanics, by coupling a metallic SiN membrane to a photonic re-entrant cavity. The attraction of the spatially localized Casimir spring mimics a non-contacting boundary condition, giving rise to increased strain and acoustic coherence through dissipation dilution. This provides a way to manipulate phonons via thermal photons leading to ‘in situ’ reconfigurable mechanical states, to reduce loss mechanisms and to create additional types of acoustic nonlinearity—all at room temperature.