Background: Recently, the frequency and severity of marine diseases have increased in association with global changes, and molluscs of economic interest are particularly concerned. Among them, the Pacific oyster (Crassostrea gigas) production faces challenges from several diseases such as the Pacific Oyster Mortality Syndrome (POMS) or vibriosis. Various strategies such as genetic selection or immune priming have been developed to fight some of these infectious diseases. The microbial education, which consist of exposing the host immune system to beneficial microorganisms during early life stages is a promising approach against diseases. This study explores the concept of microbial education using controlled and pathogen-free bacterial communities and assesses its protective effects against POMS and Vibrio aestuarianus infections, highlighting potential applications in oyster production. Results: We demonstrate that it is possible to educate the oyster immune system by adding microorganisms during the larval stage. Adding culture based bacterial mixes to larvae protects only against the POMS disease while adding whole microbial communities from oyster donors protects against both POMS and vibriosis. The efficiency of the immune protection depends both on oyster origin and on the composition of the bacterial mixes used for exposure. No preferential protection was observed when the oysters were stimulated with their sympatric strains. We further show that the added bacteria were not maintained in the oyster microbiota after the exposure, but this bacterial addition induced long term changes in the microbiota composition and oyster immune gene expression. Conclusion: Our study reveals successful immune system education of oysters by introducing beneficial micro-organisms during the larval stage. We improved the long-term resistance of oysters against critical diseases (POMS disease and Vibrio aestuarianus infections) highlighting the potential of microbial education in aquaculture.