In the present work, the risk assessment of a biogas production and upgrading plant, representative of most of the biogas sites widespread throughout Europe, was carried out. The biogas is produced by anaerobic digestion for heat and power generation. An upgrading section (based on membrane technology) was also considered, for the production of biomethane to be injected in the national gas grid. A set of possible loss of containments for each equipment unit was defined and the potential dangerous phenomena were identified by means of an event-tree analysis. The impact of such phenomena was assessed in terms of damage distances.