A high rate upflow anaerobic polyfoam-based bioreactor (UAPB) was developed for lab-scale in-situ biogas upgrading by H2 injection. The reactor, with a volume of 440 mL, was fed with synthetic wastewater at an organic loading rate (OLR) of 3.5 g COD/L·day and a hydraulic retention time (HRT) of 7.33 h. The use of a porous diffuser, alongside high gas recirculation, led to a higher H2 liquid mass transfer, and subsequently to a better uptake for high CH4 content of 56% (starting from 26%). Our attempts to optimize both operational parameters (H2 flow rate and gas recirculation ratio, which is the total flow rate of recirculated gas over the total outlet of gas flow rate) were not initially successful, however, at a very high recirculation ratio (32) and flow rate (54 mL/h), a significant improvement of the hydrogen consumption was achieved. These operational conditions have in turn driven the methanogenic community towardthe dominance of Methanosaetaceae, which out-competed Methanosarcinaceae. Nevertheless, highly stable methane production rates of 1.4-1.9 L CH4/Lreactor.day were observed despite the methanogenic turnover. During the different applied operational conditions, the bacterial community was especially impacted, resulting in substantial shifts of taxonomic groups. Notably, Aeromonadaceae was the only bacterial group positively correlated with increasing hydrogen consumption rates. The capacity of Aeromonadaceae to extracellularly donate electrons suggests that direct interspecies electron transfer (DIET) enhanced biogas upgrading. Overall, the proposed innovative biological in-situ biogas upgrading technology using the UAPB configuration shows promising results for stable, simple, and effective biological biogas upgrading.