Cave beetles are endemic to one or few caves and live in a stable subterranean microclimate and permanent darkness. However, not much is known about the food sources of cave beetles and the share of autotrophic sources in their diet. Seven cave beetles were sampled seasonally from five Romanian caves together with a sampling of sediments and climatic measurements. Gut was extracted from the sampled specimens, and Illumina's 16S amplicon-based metagenomics sequencing protocol was applied to identify the gut microbiome. About 50% of the most abundant bacteria genera in the studied sediments are unknown taxa. The core elements of the sediments' microbiome were wb1-P19, Pseudomonas, and Lysobacter, all producers and decomposers of organic matter. Only Acinetobacter was shared for sediments and all cave beetles. The core bacteria in the gut of Leiodidae beetles of all five species were Vagococcus, Dysgonomonas, Candidatus Soleaferrea, and two unknown phylotypes. The cave Carabidae gut was dominated by Carnobacterium in one species and Enhydrobacter in the other, showing different food regimes within the Duvalius genus. Vagococcus was present in the gut microbiome of Leptodirini and Duvalius, a genus which might be involved in adaptation to life in caves, where food is scarce and autochthonous productivity is low. Higher body weight in cave beetles is another helpful strategy to cope with an infrequent food supply, as demonstrated by the presence of obesity-related gut microbiota representatives, Lactococcus and Serratia.