My duckies stay in a large dog house with a hardware cloth locking door. We made the door. They go in on their own each night and i just have to shut the door.
this was a good cheap option for us because as these other posters note : ducks are a favorite food to allot of predators.
My ducks can fly and in the past, even with chicken wire, a mink got into the barn and killed one through the fence.
i love ducks so my best pro tip on training ducks is fresh peas! They love peas. as a bonus, peas are rich in niacin (vitamin B) which ducks absolutely need to be healthy.
they also love fresh tomatoes