Abstract. The effective localization of the right resources is a challenging issue at the current stage of development of P2P systems in presence of a high number of peers providing heterogeneous resource descriptions. In this paper, we present a novel approach based on lightweight communities to support routing-by-content in P2P systems. In particular, original contribution of the proposed approach regards i) the notion of lightweight community for supporting routing through self-configuring semantic overlays, and ii) the definition of a kit of semantics-based services for equipping a peer with routing-by-content functionalities based on peer ontologies and ontology matching techniques.