The Josephson effect describes supercurrent flowing through a junction connecting two superconducting leads by a thin barrier. This current is driven by a superconducting phase difference φbetween the leads. In the presence of chiral and time-reversal symmetry of the Cooper pair tunnelling process, the current is strictly zero when φvanishes. Only if these underlying symmetries are broken can the supercurrent for φ= 0 be finite. This corresponds to a ground state of the junction being offset by a phase φ0, different from 0 or π. Here, we report such a Josephson φ0 -junction based on a nanowire quantum dot. We use a quantum interferometer device to investigate phase offsets and demonstrate that φ0 can be controlled by electrostatic gating. Our results may have far-reaching implications for superconducting flux- and phase-defined quantum bits as well as for exploring topological superconductivity in quantum dot systems.