A hundred years ago, when you came off a farm or a ship looking to make a new life in Portland (or Bangor or Biddeford), where would you sleep?

Probably at a boardinghouse, where rooms rented by the night or the week and meals were included.

If you came to town today, where would you go?

Well, if you have the first and last months’ rent and a security deposit and a clean credit rating, you could rent an apartment. But if not, the options are slim.

Single people can team up and share a place if they can find each other. There are still some residence hotels and off-season motel rooms, but there is nothing that takes the place of the old boardinghouse, where newcomers could easily find an affordable place to call home.

With people looking for ways to move to cities, and the resources of homeless shelters and the city’s General Assistance Program overwhelmed, maybe it’s time we look back to a reliable old institution that served our grandparents’ generation so well.

The issue was the subject of a Jan. 13 article by Ruth Graham in The Boston Globe (“Boardinghouses: where the city was born”). She surveyed a growing body of work by historians who find them to be a key element in an emerging culture.

She cites the book “Boarding Out” (Northwest University Press) by David Falik, who writes that the close contact with a variety of people that characterized the boardinghouse lifestyle contributed to the American way of looking at the world in 19th-century literature. “We wouldn’t have had an American Renaissance without cities and we wouldn’t have had cities without boardinghouses,” he says.

The poet Walt Whitman, who Graham says lived in boardinghouses from his early teens until the Civil War, described the scene this way in 1842: “Married men and single men, old men and pretty girls; milliners and masons; cobblers, colonels, and counter-jumpers; tailors and teachers; lieutenants, loafers, ladies, lackbrains, and lawyers; printers and parsons — ‘black spirits and white, blue spirits and gay’ — all ‘go out to board.’ “

Families would take in boarders to help make ends meet. The arrangement was so common that, according to Graham, between one-third and one-half of all city residents were either boarders or took them into their homes.

Establishments like that could fill a need in a place like Portland today. City zoning is loose enough to accommodate them, said Portland’s director of planning, Jeff Levine.

A single-family house can hold up to 16 people, and a “lodging house,” which is regulated by the city, can have an unlimited number of residents.

A number of these group living situations already exist. The best known is the YMCA, which has housing in addition to its pool and workout facilities.

Group homes for people with disabilities or those in recovery from addiction exist in many neighborhoods. There should be nothing stopping some modern version of the boardinghouse from starting up now, to set up affordable living situations for people who work here.

Portland used to be full of them, said State Historian Earle G. Shettleworth. One of the last was on Valley Street, near the old Union Station, and catered to transient railroad workers. It closed in the 1970s, when the woman who owned it died.

Often the boardinghouses were set up by mills or other employers for their workers, he said. And to a culture of people used to living in large families, sharing houses did not seem strange. One person to a bedroom may have been the most privacy they’d ever had.

Boardinghouses remained a fixture through the Great Depression and World War II, disappearing in a wave of post-war affluence.

“People became much more mobile and they could establish credit, especially veterans who were returning,” Shettleworth said. “You could buy a small, single-family house.” Renting a room went out of style.

But after the Great Recession, easy credit and homeownership don’t have the same glow they once had. Neither does being tied down to a house far away from the closest job prospect in an era of $4-per-gallon gas.

The Portland City Council is reviewing the recommendations of the Homeless Prevention Task Force, which has called for adding capacity to Portland’s shelters and building more permanent supported housing — kind of a boardinghouse for chronically homeless people.

But as the city moves forward, maybe it should also take a look back and find a more affordable way to house people who are new in town.

Greg Kesich is the editorial page editor. He can be contacted at 791-6481 or at: gkesich@pressherald.com