We study the organization of federations – or international unions – which decide together the provision of certain public goods. The benefit of centralization depends on the internalization of the spillovers, that of decentralization on the adaptability to local differences. We individuate as an optimal institutional design a form of fiscal federalism based on decentralization of expenditures and a system of subsidies and transfers between countries. Since this solution can be politically unfeasible, we study institutional compromises between a centralized federation and a decentralized one. "Flexible unions" and federal mandates in which both the state and federal levels are involved in providing public goods are typically superior to complete centralization and politically feasible. Finally, we study the effects of a qualified majority voting rule in a centralized system: we find that it can be a useful device to correct a bias toward "excessive" union–level activism.