Osmotic stress-induced localisation switch of CBR1 from mitochondria to the endoplasmic reticulum triggers ATP production via β-oxidation to respond to osmotic shock.