Coffea arabica is a highly traded commodity worldwide, and its plantations are habitat to a wide range of organisms. Coffee farmers are shifting away from traditional shade coffee farms in favor of sun-intensive, higher yield farms, which can impact local biodiversity. Using plant-associated microorganisms in biofertilizers, particularly fungi collected from local forests, to increase crop yields has gained traction among coffee producers. However, the taxonomic and spatial distribution of many fungi in coffee soil, nearby forests and biofertilizers is unknown. We collected soil samples from a sun coffee system, shade coffee system, and nearby forest from Izalco, Sonsonate, El Salvador. At each coffee system, we collected soil from the surface (upper) and 10 cm below the surface (lower), and from the coffee plant drip line (drip line) and the walkway between two plants (walkway). Forest soils were collected from the surface only. We used ITS metabarcoding to characterize fungal communities in soil and in the biofertilizer (applied in both coffee systems), and assigned fungal taxa to functional guilds using FUNGuild. In the sun and shade coffee systems, we found that drip line soil had higher richness in pathotrophs, symbiotrophs, and saprotrophs than walkway soil, suggesting that fungi select for microhabitats closer to coffee plants. Upper and lower soil depths did not differ in fungal richness or composition, which may reflect the shallow root system of Coffea arabica. Soil from shade, sun, and forest had similar numbers of fungal taxa, but differed dramatically in community composition, indicating that local habitat differences drive fungal species sorting among systems. Yet, some fungal taxa were shared among systems, including seven fungal taxa present in the biofertilizer. Understanding the distribution of coffee soil mycobiomes can be used to inform sustainable, ecologically friendly farming practices and identify candidate plant-growth promoting fungi for future studies.