Frontotemporal dementia is a heterogeneous neurodegenerative disorder with around a third of cases having autosomal dominant inheritance. There is wide variability in phenotype even within affected families, raising questions about the determinants of the progression of disease and age at onset. It has been recently demonstrated that cognitive reserve, as measured by years of formal schooling, can counteract the ongoing pathological process. The TMEM106B genotype has also been found to be a modifier of the age at disease onset in frontotemporal dementia patients with TDP-43 pathology. This study therefore aimed to elucidate the modulating effect of environment (i.e. cognitive reserve as measured by educational attainment) and genetic background (i.e. TMEM106B polymorphism, rs1990622 T/C) on grey matter volume in a large cohort of presymptomatic subjects bearing frontotemporal dementia-related pathogenic mutations. Two hundred and thirty-one participants from the GENFI study were included: 108 presymptomatic MAPT, GRN, and C9orf72 mutation carriers and 123 non-carriers. For each subject, cortical and subcortical grey matter volumes were generated using a parcellation of the volumetric T1-weighted magnetic resonance imaging brain scan. TMEM106B genotyping was carried out, and years of education recorded. First, we obtained a composite measure of grey matter volume by graph-Laplacian principal component analysis, and then fitted a linear mixed-effect interaction model, considering the role of (i) genetic status; (ii) educational attainment; and (iii) TMEM106B genotype on grey matter volume. The presence of a mutation was associated with a lower grey matter volume (P = 0.002), even in presymptomatic subjects. Education directly affected grey matter volume in all the samples (P = 0.02) with lower education attainment being associated with lower volumes. TMEM106B genotype did not influence grey matter volume directly on its own but in mutation carriers it modulated the slope of the correlation between education and grey matter volume (P = 0.007). Together, these results indicate that brain atrophy in presymptomatic carriers of common frontotemporal dementia mutations is affected by both genetic and environmental factors such that TMEM106B enhances the benefit of cognitive reserve on brain structure. These findings should be considered in evaluating outcomes in future disease-modifying trials, and support the search for protective mechanisms in people at risk of dementia that might facilitate new therapeutic strategies. © The Author (2017).