Background: The ebb-and-flow system has ability to recirculate water and nutrients, and offers a good method to control nutrient leaching from greenhouses into the environment. However, the potential for the rapid spread of bacterial and fungal pathogens is the main hindrance for its adoption in vegetable seedlings production. Natural microflora has often shown a certain ability to suppress diseases.Results: Here, through 16S rRNA- and ITS1-targeted Illumina sequencing, the dynamic changes in bacterial and fungal communities in the recirculating nutrient solution were characterized for tomato plug seedlings cultivated in an ebb-and-flow system in summer and winter. Both bacterial number and microbial diversity in the nutrient solution increased with recirculating irrigation, and these changes differed between summer and winter. Pseudomonas was among the most predominant bacterial genera in the nutrient solution; its relative abundance gradually increased with recycling in summer but decreased dramatically in winter. In summer, the predominant bacteria also included Comamonas and Sediminibacterium , whose relative abundances in the nutrient solution decreased and increased, respectively. In winter, the nutrient solution was also colonized by Sphingomonas , predominantly at the late stage of irrigation. Among fungi, Amanita and Trichoderma were predominant in both summer and winter. Amanita gradually increased in summer but decreased rapidly after the first irrigation cycle in winter, whereas Trichoderma accumulated rapidly at the late stage of irrigation in both summer and winter. Alternaria and Fusarium were predominant in the nutrient solution only in summer, with the former decreased and the latter increased with recirculating irrigation. Moreover, Pseudomonas mediterranea , a potentially pathogenic bacterium, and Fusarium oxysporum , a fungal pathogen were present predominantly in winter and summer, respectively. Some potentially beneficial microbes functioning in plant-growth promotion and water self-purification, such as Sphingobium xenophagum , Trichoderma harzianum , and T. virens , were identified to be increased in the recirculating nutrient solution.Conclusions: The present data elucidate the bacterial and fungal dynamics in an ebb-and-flow system and provide useful information for pathogen control during tomato seedling production.