Background: NOD2 mutations are associated with Crohn's disease (CD). Both CD (in human) and Nod2 deficiency (in mice) are characterized by increased mucosal CD4 T-cells, an altered permeability and a microbial dysbiosis. However, the respective roles of the gut epithelial and immune compartments on the phenotype are not known. Methods: Microbial composition, epithelial peptide secretion, intestinal permeability, and immune cell composition of Peyer patches were studied in Nod2 knock-out mice transplanted with wild-type bone marrow cells and vice versa. Results: The nonhematopoietic cells control the microbiota composition and epithelial secretion of mucins and antimicrobial peptides. These parameters are correlated with recurrent associations between bacterial species and luminal products. In contrast, Nod2 in the hematopoietic compartment regulates the epithelial permeability and the gut-associated lymphoid tissue independently of the bacterial composition. Conclusions: The immune system and the gut permeability in one hand and the microbial and epithelial peptide compositions in the other hand are separate couples of interdependent parameters, both controlled by Nod2 in either the hematopoietic or nonhematopoietic lineages.