UPRmt coordinates immunity to maintain mitochondrial homeostasis and animal fitness.