After the 9/11 terrorist attacks, Margaret Hathaway and Karl Schatz ended up in Maine. The collapse of the twin towers sent Schatz, former photo editor of Time.com, and Hathaway, manager at famous cupcake shop Magnolia Bakery, on a quest to see the country and visit goat farms.

“We went across the country looking for a model. We visited big operations, small operations, commercial hobbyists,” Schatz said.

Hathaway wrote a book, “The Year of the Goat,” published in 2007, chronicling their adventure. That year — long before goats started trending — has spun into a decade of goat farming, goat hikes and goat cheese making at Ten Apple Farm in Gray.

On a rolling, 17-acre spread the couple, who now have three girls, lead a modern homesteading life. After milking goats in the morning, he goes to an office in Portland. She tends the farm. With 10 goats, chickens, pigs, lambs, ducks, turkeys, geese and a vegetable garden, their daily rounds are head-spinning and chore-laden.

All around the 1901 farmhouse with an attached barn and hidden apple orchard, goats bleat, chickens cluck, screen doors slam and children romp. Their dedication to the seasons, the land and healthy living is a full-time obsession.

“What felt the best to us is an integrated homestead that closes the loop between production and consumption,” they explained. “So the waste from the garden goes to the chickens and the goats and pigs. All the goat manure goes back into the garden. The excess milk from the goats goes to the pigs and the chickens.”

In this Cumberland County bedroom community, Ten Apple Farm has become a low-key destination for those seeking tranquility. In the summer, they lead goat hikes, showing the hidden charms of their pastoral oasis. A cozy house in the woods, where Hathaway’s father once lived, is now a popular Airbnb farm retreat, complete with amenities such as learning to milk goats. It’s often seasonally booked.

When they slaughter chickens, they announce on their Facebook page that the public is invited to come over to learn about backyard poultry. This is not a commercial enterprise. They don’t have anything to sell, yet they have much to share.

“I think homestead in some ways doesn’t adequately describe what we do,” Schatz, 46, said. “If we had to come up with a label, I’d call it agritourism. It’s about education and activity.”

And staying active is the name of the game.

Between bottle feeding kids — the goat kind — and carrying buckets of warm goat’s milk to the pigs, the 39-year-old mother somehow finds time to work on a manuscript for her fifth book. She also holds a part-time job and looks after her daughters, ages 4, 8 and 10. In the kitchen she’ll bake bread, whip up a strawberry rhubarb cobbler and pull together dishes such as a kale and Brussels sprout salad with ease night after night. Some evenings her husband grills a whole chicken, harvested from their flock outside.

“For us, raising the meat that we eat is an important aspect to what we do,” said Schatz, who grew up in Hallowell and always dreamed of a simpler, bucolic life.

What they didn’t realize when they started, though, was how tired they’d be.

“In many ways it’s a schizophrenic life, and in many ways it keeps us sane,” said Hathaway, who grew up in Kansas and graduated from Wellesley College with a degree in English and anthropology. Clearly, the well-educated, articulate and capable couple could be doing anything.

By turning this gentleman’s farm into a working family endeavor, they saved it from encroaching developers and found peace and purpose amid the wild blueberry patches ringing the apple trees.

“It is soul-satisfying work. We are incredibly passionate but also like some bougie things,” said Hathaway, who listens to podcasts while doing her chores and an iPad in the kitchen fills the air with soft rock. Off-the-grid they are not.

Would it be easier to run out and grab a pie, when her daughter, who just returned from sleepaway camp, requests one?

“We are trying to raise our children the way we believed a person could live,” she said.

“There is tremendous satisfaction in eating food that you’ve grown and growing food you are going to eat,” he said.

When they have to break down in the winter and buy things such as kale, “it always feels like failure. It’s like a dagger in my heart,” she said.

They’ve eased up on living 100 percent local — they enjoy coffee, citrus and olive oil — but “it’s a conscious challenge,” Hathaway said. “We have three kids. We want to leave the planet better for them. We’d always like to be doing more.”