Sarah Hastings’ 190-square-foot home was on 3 acres of farmland next to a small garden in Hadley, Massachusetts. Now it’s in storage.

The 23-year-old recent college graduate built the house last year while she was a student at Mount Holyoke College. But like many who want to live in a “tiny house,” generally defined as a home smaller than 500 square feet, she has struggled to find a place to put it.

After somebody reported her for violating Hadley’s zoning ordinances, Hastings proposed changing the town’s laws to allow for backyard apartments, but the measure was voted down in a town meeting.

Some local governments around the country are welcoming tiny houses, attracted by their potential to ease an affordable housing crunch or even house the homeless. Cities such as Washington, D.C., and Fresno, California, have eased zoning and building rules to allow them, and in May California’s housing department issued guidance to help builders and code enforcers know which standards they need to meet. They are even the subject of the HGTV shows “Tiny House, Big Living” and “Tiny House Hunters.”

But lost in the enthusiasm is the fact that in many places, it is hard to live in them legally.

Many residents and local officials fear they will drive down property values. Some state and local governments, perplexed about whether to classify tiny houses as RVs, mobile homes or backyard cottages, still refuse to allow them.

And as for tiny houses being a solution to the affordable housing crunch, some housing experts caution they aren’t right for everyone.

“People using affordable housing are a diverse group. You’ve got retired people, disabled people, families,” said Robert Silverman, a professor with the University of Buffalo’s School of Architecture and Planning. “A 300-square-foot trailer with a loft up top may not be suited for all those groups.”

Hastings said Hadley rejected her tiny house proposal because some residents were afraid the town would be overrun with them. “There was kind of a backlash. It only takes a few people saying ‘Oh, there’ll be 500 of them,’” she said.

The ‘Wild West’ of Construction

In 2015, the median new family home in the U.S. was 2,500 square feet, 61 percent larger than homes from 1975.

Tiny houses have gained traction with people who want to live a simpler life with fewer possessions and financial obligations, and who want to have a smaller environmental footprint. Some nonprofits are eyeing them as a possible solution for people priced out of overheated housing markets.

The difficulty has been where to place them. Those built on foundations must meet local building and zoning regulations. But many tiny houses are built off-site, sometimes without knowing where they will ultimately rest. That makes it difficult to know which building codes to meet, especially if owners plan to move them from place to place.

Bill Rockhill, the founding president of the American Tiny House Association and a New York-based builder who primarily builds tiny houses, said he and other builders try to follow uniform building codes for houses or a similar set of standards for RVs. Still, not all requirements can be met — the ladders in a tiny house may not meet requirements set forth for stairs, and lofts may not have high enough ceilings.

During construction, Rockhill takes photos of everything inside the walls so that customers can talk with building inspectors about construction. He said code enforcers can be flexible on some safety requirements, such as allowing a loft as long as it has a large enough escape window.

“It’s kind of the Wild West of building,” said Tony Gilchriest, a builder based in Washington, D.C. But Gilchriest notes that the lack of clear standards makes some builders more cautious. That is especially true when the owners of a tiny house plan to move it frequently, and it must be sturdy enough to be driven down the highway at 60 mph.

“I think people overbuild because they’re afraid,” he said.

But Dan Buuck, a specialist on codes and standards for the National Association of Home Builders, insists that some tiny houses are filled with dangers. Smoke can accumulate more quickly in low-ceiling and loft areas, and ladders and small windows make it harder for help to get in and out.

Those concerns have spawned a cottage industry of firms willing to certify that a tiny house is safe. Chuck Ballard with Pacific West Associates Inc. said his company reviews architectural plans and photos of construction before issuing the certification, which costs around $2,000.

On the Ground

As of now, few cities allow stand-alone tiny houses. Most communities have minimum square footage requirements for single-family homes mandating that smaller dwellings be an “accessory” to a larger, traditional house. Many also have rules requiring that dwellings be hooked up to utilities, which is a problem for tiny-house enthusiasts who want to live off the grid by using alternative energy sources such as solar panels and rainwater catchment systems.

That’s the case for Brian Levy, whose 210-square-foot tiny house in a peaceful back alley alongside a cemetery in Washington, D.C., isn’t considered fit to be occupied full-time because it is on its own piece of land and it is not connected to city utilities.

Many cities are more accommodating to tiny houses on foundations, which are considered guest cottages — as opposed to those on wheels. Starting in the fall, D.C.’s new zoning regulations will permit tiny houses in some neighborhoods, as long as they are on a foundation and are connected to utilities.

When cities require the same permitting for tiny houses on foundations as they do for traditional houses, it often doesn’t make financial sense to build tiny. “At that point it’s really more of a lifestyle choice than an economic choice,” said Nick Krautter, a real estate agent in Portland, Oregon, who abandoned plans for a tiny house development.

Just a few cities allow tiny houses that rest on wheels, including Fresno, where they are now considered backyard cottages.

Tiny Towns, Tiny Houses

Alexis Stephens, a tiny house dweller who has been traveling the country making a documentary on how people are living in tiny houses legally, said small towns have been more open to tiny houses than their larger counterparts.

One example is Spur, Texas — population 1,318 — where people hope tiny houses will help revitalize the shrinking community. In 2014, Spur declared itself the nation’s first tiny-house-friendly town.

John Schmidt, the city’s home inspector and code enforcement officer, said the process began by selling lots in town for as little as $250. The town has already sold 60 lots, and though they’re a little less than a quarter of an acre, that’s plenty of room for a tiny house, a driveway and a garden.

There are three tiny houses now, and five more are expected to be finished by the end of the summer. Because the key is to get these new residents to stay, they must put their house on a foundation and connect to city utilities. If the tiny house was originally constructed on wheels, the owner needs to remove the wheels and axles and put a skirt around the base to keep out critters. “We’ve got people paying taxes, going to schools, buying groceries. It’s a boon to the town because of the income,” Schmidt said.

Stephens said Rockledge, Florida, is taking a different approach. The town recently approved zoning regulations that would allow for a “pocket neighborhood,” or cluster, of tiny houses.

Tiny houses there can keep the wheels on, but they must build both a front and a back porch.

“It’s enough to discourage frequent travel but it doesn’t prevent it if needed or desired,” Stephens said.

A Home of Their Own

Many advocates of tiny houses see them not just as part of a trendy minimalist movement, but as a way to offer affordable housing to millennials, retirees, low-income people and even the homeless.

There are a handful of tiny house communities for the homeless in places like Oregon, Texas, Washington and Wisconsin. More are on the way in Detroit and Kansas City.

Panza in Olympia, Washington, and Mobile Loaves & Fishes in Austin, Texas, are nonprofits that rent tiny houses to the homeless for a small sum. Panza’s Quixote Village started as a tent camp. Now it includes 30 tiny houses which people can rent for 30 percent of their income, or at least $50 a month. And a Mobile Loaves & Fishes program called Community First Village just finished building over 100 tiny houses in a mix of architectural styles, which will rent for $225 to $375 a month.

In both Olympia and Austin, the tiny houses lack bathrooms and kitchens. Instead, residents must share common bathrooms and kitchens — an arrangement designed to foster a sense of community and keep the cost of the houses low.

Some of the tiny house communities in development around the country will take a different approach.

Cass Community Social Services, a nonprofit in Detroit, is building 25 tiny houses. The rent-to-own structures will have both bathrooms and kitchens. The Rev. Faith Fowler, the group’s director, said the homes will be available to those transitioning from homeless shelters, students who are aging out of the foster care system and low-income seniors.

Fowler said her main goal isn’t just to house this population, but to address asset inequality — to give people something so they can borrow money, leave property to their kids, or even sell. People will rent the tiny house for the first three years and be added to a lien for the last four. After seven years, the house will be theirs.

Fowler said the project will be different from other affordable housing because it will provide a path to ownership for tenants. It also offers GED classes, and a gym and small store within walking distance. All will employ residents.

But Cate Mingoya, who oversees public housing and rental assistance for Massachusetts, cautioned that not all tiny houses are a good solution for the homeless.

When Mingoya toured several tiny house homeless communities she found that some homes were well constructed but others weren’t properly built, leaving them vulnerable to the elements. “How much choice do they really have to live in that house?” she said. “When you’re segregating people based on income and tell them you get 120 square feet, there’s a social cost.”

This story was produced by Stateline, an initiative of The Pew Charitable Trusts.