A pair of rams can live in a20-gallon community tank or in a 10-gallon breeding tank with no other fish. If you wish to keep two pairs of rams, increase the aquarium size to 40 gallons so that each set has enough territory.
German Blue Rams Recommended Water Conditions 72-79° F, KH 5-12, pH 5.0-7.0