A complex gut microbiota is required for proper immune cell development and homeostasis. But what about the homeostasis of microglia — the macrophages resident in the brain? Prinz and colleagues found marked defects in the microglia from germ-free mice compared with specific pathogen free (SPF) mice: they were present in higher numbers, had an immature phenotype and morphology, and showed diminished responses to pathogen-derived products or viral infection. Temporary depletion of the intestinal microbiota of SPF mice by antibiotic treatment also impaired microglia homeostasis, and recolonization with a complex microbiota normalized microglia phenotype and function. Strikingly, exposure of germ-free mice to bacteria-derived short-chain fatty acids largely rescued the defects in microglia number and maturation. Thus, ongoing input from microbial metabolites maintains microglia homeostasis.