Highly acidic (pH 0-1) biofilms, known as snottites, form on the walls and ceilings of hydrogen sulfide-rich caves. We investigated the population structure, physiology and biogeochemistry of these biofilms using metagenomics, rRNA methods and lipid geochemistry. Snottites from the Frasassi cave system (Italy) are dominated (>70% of cells) by Acidithiobacillus thiooxidans, with smaller populations including an archaeon in the uncultivated G-plasma clade of Thermoplasmatales (>15%) and a bacterium in the Acidimicrobiaceae family (>5%). Based on metagenomic evidence, the Acidithiobacillus population is autotrophic (ribulose-1,5-bisphosphate carboxylase/oxygenase (RuBisCO), carboxysomes) and oxidizes sulfur by the sulfide-quinone reductase and sox pathways. No reads matching nitrogen fixation genes were detected in the metagenome, whereas multiple matches to nitrogen assimilation functions are present, consistent with geochemical evidence, that fixed nitrogen is available in the snottite environment to support autotrophic growth. Evidence for adaptations to extreme acidity include Acidithiobacillus sequences for cation transporters and hopanoid synthesis, and direct measurements of hopanoid membrane lipids. Based on combined metagenomic, molecular and geochemical evidence, we suggest that Acidithiobacillus is the snottite architect and main primary producer, and that snottite morphology and distributions in the cave environment are directly related to the supply of C, N and energy substrates from the cave atmosphere.