Property Lines is a column by Curbed senior reporter Patrick Sisson that spotlights real estate trends and hot housing markets across the country. Comments, tips, and suggestions on where Property Lines should head next are welcome at patrick@curbed.com .

Teaching crises have challenged American education for decades. Increasing enrollment, substandard facilities, and a scramble to find a way to pay for solutions: Today’s familiar pressures were making headlines back in 1954. At the time, in another example of “same news, different day,” the San Francisco superintendent of schools declared that the city’s teacher shortage was “acute.”

While the issue may be the same, today’s teaching crises in the Bay Area have taken on dimensions that postwar administrators couldn’t have imagined. San Francisco and its surrounding communities offer the most extreme case studies that showcase the challenging math of making it, and making a home, as an urban school teacher.

According to Apartment List data, fifth-year teachers in the city have to spend nearly 70 percent of their income to rent a one-bedroom, and Trulia noted that the city’s teachers can only afford .04 percent of the homes in the entire city. A recent profile in the San Francisco Chronicle told the story of a public high school math teacher, Etoria Cheeks, who is homeless, despite carrying a full load of classes as well as coaching and tutoring students after school.

Housing has become such a drain on salaries that San Francisco Mayor Ed Lee recently announced the city would build its own rental housing in the Outer Sunset neighborhood specifically for teachers. This is yet another sign, coupled with the prevalence of couchsurfing and long commutes, that its educators are losing the battle against escalating rent.

Teachers are often lionized for tackling a difficult job without the salaries and support they deserve. Yet increasingly, they also face affordability challenges outside the classroom. Rising rent and housing costs have made teaching jobs in pricy urban districts increasingly difficult for schools to fill. According to research by the Learning Policy Institute (LPI), the United States was short roughly 100,000 teachers last year, with compensation cited as a key reason many have left positions, or the profession altogether.

For many school districts, especially in California, alleviating the real estate squeeze facing teachers is becoming a more prominent part of efforts to retain talent. For school districts, factoring housing into compensation and pay packages, or even becoming landlords themselves, is becoming a new way to offer more than just a salary bump. Teachers get a better quality of life, are able to afford housing closer to their classrooms, cut down on their commute, and retain a connection with the communities they serve. Without radical increases in education budgets, this is an increasingly popular and creative way to make salaries stretch further.

“The main thing to realize is there isn’t a silver bullet,” says Anne Podolsky, a researcher at the Learning Policy Institute. “Increasing compensation is good, but teachers also need good administrators, support, and resources to succeed.”

School districts see the advantage of getting involved in real estate because two detrimental trends are unlikely to reverse themselves anytime soon. Urban real estate seems destined to increase in value, putting more pressure on salaries—a 2014 Center for American Progress report found that in many states, mid-career teachers heading families of four or more are so financially strained, their families qualify for reduced-price school lunches, and an Economic Policy Institute study last year found weekly teacher pay had actually decreased between 1996 and 2015.

Unhappy teachers are also very costly. If the U.S. attrition rate among educators decreased from its current rate of 8 percent to 4 percent (the rate found in other highly educated countries), the current teacher shortage would disappear, according to the LPI, and a significant chunk of the $2.2 billion the U.S. spends on teacher recruitment and retention efforts could be redirected elsewhere. A recent LPI study, “A Coming Crisis in Teaching?” lays out some stark figures suggesting the challenge of retaining talent will become even more difficult: between 2009 and 2014, teacher education enrollments dropped from 691,000 to 451,000, a 35 percent reduction. That’s 240,000 fewer professionals on their way to the classroom at a time when retention is already straining school administrators and budgets.

Teacher shortages have hit both urban and rural districts hard, with the latter especially challenged by geographic, social and economic isolation. It seems especially perverse that in the United States, where much of the educational funding comes from property taxes, a “successful,” highly sought-after and expensive urban district in an expensive coastal area such as Silicon Valley would find itself facing a similar workforce challenge as a poorer rural one, which is given so much less to spend per pupil.

But that’s the reality of the crisis, and one reason why housing incentives have arisen as a potential fix. Numerous concepts have taken shape: in addition to Mayor Lee’s plan to build housing in San Francisco, the San Francisco Unified School District has long debated a plan to turn unused buildings into housing for staff. To help with such efforts, California passed a law, the Teacher Housing Act of 2016, that allows school districts to take advantage of state and federal low-income housing tax credits while restricting the buildings to teachers and district employees (under prior law, it would be illegal to discriminate based on profession). It’s meant to spur school districts to get into the housing game: sponsor and State Senator Mark Leno, said that, “when high-quality teachers can’t afford to live where they work, the entire community suffers.”

Other districts across the country have offered incentives with varying degrees of success. New York City once offered housing incentives to teachers working in subjects with a shortage of instructors, such as mathematics, a solution which Podolsky found to be well-designed. Texas provides teachers with low, fixed-rate home loans and offers grants for down payment assistance. The Los Angeles Unified School District attempted to develop the Sage Brush Apartment complex as affordable teacher housing, but, due to a misunderstanding of the income requirements that come with using low-income housing credits, created housing that excluded many teachers who made too much to qualify for the benefits. The building has instead been used to house other district employees, such as janitors and cafeteria workers.

While building physical sites for teacher housing is certainly more attention-grabbing than raising salaries, the Teacher Housing Act, which is yet to produce a new facility, raises the question of whether a large urban district can even build enough units to make a significant difference in staffing issues.

Podolsky says residency programs, which provide teachers-in-training with tuition and housing stipends in return for a commitment to teach in a certain district, have shown promise in attracting and keeping teachers in specific communities. She’s spoken to educators and administrators in many districts who have just started or are planning to introduce some form of housing assistance, but says not yet enough literature, evidence, or research exists to determine the effectiveness of many of these ideas. But, along with the expected lifestyle benefits that would come from living closer to work, an LPI survey found that 25 percent of teachers would be more likely to stay at a job if it provided housing assistance.

But what if it’s not about schools getting into the market, but helping the market benefit from schools? One of the more intriguing examples of teacher-focused housing developments came not from a school administrator, but an established real estate pro. Ron Beit, founding partner and CEO of RBH Group, has spent nearly a decade putting together Teacher’s Village in Newark, New Jersey, a redevelopment project based on the idea that public and private social-impact investors see the need to help teachers, who as tenants also give back to both the community and the value of the investment.

The genesis of the idea came when Beit met with teachers working in the area and realized they were traveling from all over the region, often long distances, to work in Newark. It was eye-opening, he said, to come face-to-face with the energy they put into their jobs.

“We knew that we needed public investment in downtown Newark,” he says. “The project was going to be the first ground-up development in Newark in decades. I thought it would be great to tap into these teachers’ energy and put them at the center of the community.”

The $150 million multi-use development, clustered in a four-block area near Newark’s Penn Station, combines three charter schools with retail and residential space, with 70 percent of the project’s 204 housing units currently occupied by educators, who receive a discount on market rent (there’s a preference for newer teachers and those who teach in local schools). Rents start at $1,000 for a studio, $1,400 for a one-bedroom, and $1,900 for a two-bedroom unit. Beit even got architect and Newark native Richard Meier to design the sleek, gridded white towers in his signature style.

“I thought it would be great to tap into these teacher’s energy and put them at the center of the community.”

Beit says the value of social good is also good for business. Teacher’s Village took shape during a time when roughly a billion dollars was flowing into the adjacent neighborhood, part of the New Jersey city’s booming real estate market. But his project, which took nine years of wrangling to get funding, is also based around some of the lifestyle improvements Podolsky says teachers want. Beit pushes the idea of clustering as a big advantage of the Teacher’s Village concept. Get a group of teachers together, regardless of whether they are public, private, or charter teachers, and allow them to socialize and share ideas.

“This is absolutely necessary for cities such as San Francisco,” Beit said, when asked about the scalability of his idea. “For the quality of life of teachers, to have the ability to train and recruit… San Francisco probably needs it on an even larger scale than we’re thinking.”

Beit’s idea has already attracted interest in other markets. New Teacher’s Villages are in the works in Hartford, Connecticut, and Chicago, and he says he’s in talks with a handful of other municipalities. Another somewhat similar project in Washington, D.C., the Charter School Incubator Initiative, spent $14.7 million on a former Catholic college, which it’s transforming into teacher housing and charter school space.

Beit believes schools will struggle in their efforts to build housing for their teachers because it’s analogous to affordable housing development, which as the Los Angeles school district discovered, can be tricky. In San Francisco, for instance, the upper income for qualifying for LITC subsidies is $45,250, while the average teacher’s salary is $67,537.

“You can only capture a small subsection of the teaching market, since most teachers are making too much money for these kind of units,” he says.

With the residential portions of the project having just opened, it’s too soon to tell if Beit’s concept works as both a real estate development and a tool to recruit and retain teachers.

But it’s definitely not too soon to find ways for school districts to stretch their budgets and make it more affordable to live as a teacher. According to Podolsky, surveys by LPI suggest the teacher shortage plaguing schools will get worse; 80 percent of districts in California said they forecast more trouble finding and keeping talent in the future.

Ideally, finding ways to help teachers continue to live in and be valuable members of expensive urban communities creates solutions that can be applied to other public servants and workers. After all, teachers are far from the only ones feeling the squeeze of creeping rent increases and the stress of having to live in a community different from the one you work in.