Fungi living inside plants affect many aspects of plant health, but little is known about how plant genotype influences the fungal endophytic microbiome. However, a deeper understanding of interactions between plant genotype and biotic and abiotic environment in shaping the plant microbiome is of significance for modern agriculture, with implications for disease management, breeding and the development of biocontrol agents. For this purpose, we analysed the fungal wheat microbiome from seed to plant to seeds and studied how different potential sources of inoculum contributed to shaping of the microbiome. We conducted a large-scale pot experiment with related wheat cultivars over one growth-season in two environments (indoors and outdoors) to disentangle the effects of host genotype, abiotic environment (temperature, humidity, precipitation) and fungi present in the seed stock, air and soil on the succession of the endophytic fungal communities in roots, flag leaves and seeds at harvest. The communities were studied with ITS1 metabarcoding and environmental climate factors were monitored during the experimental period. Host genotype, tissue type and abiotic factors influenced fungal communities significantly. The effect of host genotype was mostly limited to leaves and roots, and was location-independent. While there was a clear effect of plant genotype, the relatedness between cultivars was not reflected in the microbiome. For the phyllosphere microbiome, location-dependent weather conditions factors largely explained differences in abundance, diversity, and presence of genera containing pathogens, whereas the root communities were less affected by abiotic factors. Our findings suggest that airborne fungi are the primary inoculum source for fungal communities in aerial plant parts whereas vertical transmission is likely to be insignificant. In summary, our study demonstrates that host genotype, environment and presence of fungi in the environment shape the endophytic fungal community in wheat over a growing season.