Do not use tin cans, milk cartons or metal nest boxes. They can overheat and kill the eggs and young birds. The only exceptions are commercial aluminum martin houses. Most birds are territorial and protect the area around their nests. Goldeneye mergansers and wood ducks are not territorial, so you can place their houses closer together.
Wood is the best material to use.
Avoid pressure-treated lumber because when it gets wet it can give off vapors that are poisonous to birds. Preservatives, such as paint or stain, can be used on the outside of the box, especially the back, but not on the inside. Avoid using creosote as a preservative. Do not use tin cans, milk cartons or metal for nest boxes. They can overheat and kill the eggs and young birds.