The role of host-associated microbiota in enduring dehydration and drought is largely unknown. We have used lichens to study this increasingly important problem because they are the organisms that are optimally adapted to reoccurring hydration/dehydration cycles, and they host a defined and persistent bacterial community. The analysis of metatranscriptomic datasets from bacterial communities of the lung lichen (Lobaria pulmonaria (L.) Hoffm.), sampled under representative hydration stages, revealed significant structural shifts and functional specialization to host conditions. The hydrated samples showed upregulated transcription of transport systems, tRNA modification and various porins (Omp2b by Rhizobiales), whereas the desiccated samples showed different functions related to stress adaption prominently. Carbohydrate metabolism was activated under both conditions. Under dry conditions, upregulation of a specialized ketone metabolism indicated a switch to lipid-based nutrition. Several bacterial lineages were involved in a functional transition that was reminiscent of a ‘fasting metaorganism’. Similar functional adaptions were assigned to taxonomically unrelated groups, indicating hydration-related specialization of the microbiota. We were able to show that host-associated bacterial communities are well adapted to dehydration by stress protection and changes of the metabolism. Moreover, our results indicate an intense interplay in holobiont functioning under drought stress.