We investigated the effect of hole doping and quenched disorder on the phase diagram of Y1-xCaxBa2Cu3O6+y, by exploiting the double doping mechanism of Y–Ca substitution and O intercalation in the undoped-to-heavily underdoped regime. We show that the insulator to metal transition, governed by the mobile hole concentration, reflects only the charges transferred by chain oxygen (the y fraction in the chemical formula). The transition is preceded by the suppression of antiferromagnetic order, which is replaced by a cluster spin glass ground state. We discuss the effect of doping and disorder on both magnetic states and on the appearance of superconductivit