Establishing partnerships among agro-industrial properties and selecting ideal locations for biogas plants are crucial challenges in large-scale biogas production and can influence both operational efficiency and waste management. In this context, this research proposes a new matheuristic that addresses the problems of defining a group of properties and an optimal number of groups and identifies the best allocation to the biogas plant. The group properties were defined by hierarchical and K-means cluster algorithms. The best location for the biogas plant was determined by the proposed multiobjective mathematical model. The best cluster number was decided by two strategies: (1) one that selected the closest non-dominated solutions to the ideal solution (M1) and (2) one that favored the most environmentally friendly solution (M2). The matheuristic was tested using three real databases, which yielded strategic clusters with an average daily biogas production of 544.93 m³/day (M1 and M2) for DataBase 1, 1635,156.00 m³/day (M1) and 403,497.50 m³/day (M2) for DataBase 2, and 318,662.50 m³/day (M1) and 20,479.58 m³/day (M2) for DataBase 3. This research provides an opportunity to add value to agro-industrial properties by achieving energy security and developing new business networks.