Infections after surgical interventions are assumed to be caused by contamination. We show by analyzing multicentric data of 6561 patients that surgical infections as well as sepsis had a predominantly enteric microbial signature irrespective of the type of surgery, suggesting failure of intestinal bacterial compartmentalization. In mice, we reveal that hepatic surgery induced dysregulation of intestinal and hepatic type 3 innate lymphoid cells (ILC3s) and intestinal leakage resulting in enteric bacterial translocation via lymphatic vessels. In the absence of hepatic ILC3s, inflammasome activation and the induction of antimicrobial peptide encoding genes, bacteria colonized remote systemic organs and impaired surgical outcomes. Conversely, mammalian-microbial commensalism is required for the education of host immunity to ensure optimal hepatic healing responses. In fact, microbial-derived products were sufficient for the induction of proliferative transcriptional networks in the mouse liver, as illustrated by serum transfer experiments, mass spectrometry and RNA expression analysis, indicating that the balanced exposure of the host to commensals is essential for recovery. This study reveals the intestinal origin of microbes causing complications after surgical interventions and highlights host protective mechanisms of controlled commensalism that prevent infections.