In recent years, several studies have been developed to understand the impact of fermentation on the final quality of coffee and have indicated that postharvest processing could be a determinant of quality. However, a trend has appeared as a scientific counterpoint, indicating that the interactions between soil, fruit, altitude, and slope exposures with respect to the Sun are important to understand the behavior of the microbiome in coffee. Studies on the microbiota of coffee have addressed its role during the fermentation process, however the knowledge of indigenous microorganisms harbored in fruits and soil of coffee trees growing in fields are essential, as they can contribute to fermentation. Therefore, the aim of this work was to evaluate the influence of topographic and edaphic factors on the bacterial and fungal communities present in the soil and in the fruits of Coffea arabica trees. Samples of fruits and soil were collected from different growing areas at different altitudes and soil conditions. The microbial DNA was extracted and sequenced. The results showed the contribution of environmental factors in the structure of bacterial and fungal communities. The richness, evenness and diversity of the mycobiome and bacteriome were higher in the soil than in the fruits, independent of altitude. In addition, coffee trees at higher altitudes tended to have more bacteria shared between the soil and fruits. The co-occurrence/co-exclusion network showed that bacteria-bacteria connections were greater in higher altitudes. On another hand, fungi-fungi and fungi-bacteria connections were higher in low altitudes. This was the first study that evaluates in deep the influence of environmental factors in the microbiota habiting fruits and soil coffee trees, which may affect the coffee beverage quality.