Water cisterns to collect rainwater were also built within the castle walls; in the case of Dover Castle, these cisterns were in a building attached to and in front of the keep. Pipes carried rainwater from the roof into the cisterns, and it was also possible to get water from a well by using a bucket on a chain.