(Micro)organisms are exposed to fluctuating environmental conditions, and adaptation to stress is essential for survival. Increased osmolality (hypertonicity) causes outflow of water and loss of turgor and is dangerous if the cell is not capable of rapidly restoring its volume. The osmoregulatory adenosine triphosphate-binding cassette transporter OpuA restores the cell volume by accumulating large amounts of compatible solute. OpuA is gated by ionic strength and inhibited by the second messenger cyclic-di-AMP, a molecule recently shown to affect many cellular processes. Despite the master regulatory role of cyclic-di-AMP, structural and functional insights into how the second messenger regulates (transport) proteins on the molecular level are lacking. Here, we present high-resolution cryo-electron microscopy structures of OpuA and in vitro activity assays that show how the osmoregulator OpuA is activated by high ionic strength and how cyclic-di-AMP acts as a backstop to prevent unbridled uptake of compatible solutes.