Correction: An earlier version of this article incorrectly referred to the vehicle as a 180-foot van. It is a 15-foot van.

Bob Allen rents vans outfitted with beds and mini-kitchens to San Franciscans in need of housing who can't afford the city's exhorbitant apartments. (Bob Allen)

Dwayne Golstein works for a pathology firm in Los Altos, Calif., handling delivery and lab work during a swing shift from 3 p.m. to midnight.

Every morning, he wakes up in his home on a street nestled between a shopping plaza and office building complexes.

Faced with the most expensive rentals in the nation, workers in the Bay Area increasingly are searching for creative housing options. Somewhere between homeless encampments and luxurious lofts, another in a growing list of alternatives has surfaced for Golstein and others priced out of the market: renting a van not to drive but to live in.

“At least once a day I lose my mind. It’s low light, I’m tired, and I’m trying to get out of my clothes,” said Golstein, 38.

“I’m loading up my laptop. Wait, where’s my phone? I just had my phone,” he added. “Or I’ll cut up something to eat. Where are my utensils? You’re sitting basically on a bed where you can’t walk around and look. That’s the difficulty.”

Golstein found Bob Allen’s van rental on Craigslist recently. Allen’s sleeper “go-tel” rental business is relatively cheap, mobile and an adventure. The longtime San Francisco resident owns two white 2015 Dodge Caravans that he rents out short- and long-term, depending on customers’ needs, be they for camping, weekend trips or week- or month-long ­rentals.

Allen, 68, said he considered every detail when he came up with the idea in 2012. His vans include eight-inch foam beds that can sleep two, storage underneath the beds, tinted windows and curtains for privacy and kitchenette areas with electric two-burner stoves and shelves in the back.

What some may call roughing it, Allen calls an affordable solution. He charges $700 to $800 a month to rent his sleeper vans, in addition to 40 cents a mile charged via Getaround, the car-sharing service.

A basic rental agreement Allen printed off the Internet outlines the rest of the terms.

Renters can also throw in Allen’s “add-on packs,” which offer options such as a frying pan, bowls and cooking utensils at $2 a day, or a fishing pole, spinner reel and bait at $1 a day.

Other items such as a folding table or additional stoves are also available for additional per-day costs. And it all comes with a how-to guide Allen wrote himself on where to park, shower and cook, plus other tips on navigating life in a van.

San Francisco remains the most expensive place to live in the country, with latest reports estimating median rent for a one-bedroom apartment at $3,590, according to April’s numbers by real estate start-up Zumper. Some renters get creative in order to survive the housing crisis — living on a sailboat or in a wooden box or trucks.

Others besides Allen try to market their ideas to struggling renters. In March, after the story about an illustrator living in a wooden box in a friend’s living room went viral, the man offered on his website to build boxes for other people to live in or rent out. And Craigslist seems to serve up more absurdity, with listings such as a crawl space in Pacific Heights for $500 or a shipping container in Bayview for $600. The horrors go on: bug infestations, toilets inside closets, and roommates packed into bunk beds and partitioned living rooms.

The van “is an alternative to outrageous rent in this city,” Allen said. “You have to be a good planner. You have to be discreet.”

Sleeping in vehicles remains part of a larger conversation in the country, as many cities leave it to police discretion on how to handle car-dwelling.

“Sleeping in vehicles is a type of ban that has really increased in recent years,” said Maria Foscarinis, founder and executive director of National Law Center on Homelessness & Poverty.

The center’s 2014 report on the criminalization of homelessness found more cities frown upon sleeping in cars.

According to the center’s national survey of 187 cities, from 2011 to 2014, there was a 119 percent increase in the number of cities banning sleeping in vehicles. In 2014, 81 cities banned it.

Allen charges $700 to $800 a month to rent his sleeper vans, in addition to 40 cents a mile charged via Getaround, the car-sharing service. (Bob Allen)

For the time being, San Francisco law specifies only where and when people cannot live in their vehicles. According to San Francisco Municipal Police Code, the “use of vehicles for human habitation” is prohibited from 10 p.m. to 6 a.m in streets, parks or beaches within the city and county.

“This section is not often enforced,” Officer Albie Esparza said in an email.

Most car-dwellers will be asked to leave or receive a ticket and fine from police. In extreme situations, violators may receive jail time. Allen says none of his renters have experienced trouble with the law so far.

But the laws in California may soon shift. In June 2014, Los Angeles’s law banning living in vehicles was challenged and brought to the Court of Appeals for the 9th Circuit, which struck the law down as unconstitutional.

“I know at least some cities in California have been looking at their laws in light of that decision,” Foscarinis said.

Still, Golstein says, living in a van is far from ideal.

He says he times his meals to limit bathroom trips. His go-to meal after coming back from work, usually bought at Trader Joe’s, consists of avocado and smoked oysters in olive oil tossed in an herb salad with honey mustard. He noticed losing some weight in the month after moving into the van.

“I mean, it sucks I can’t eat food unless I’m at work, or I go out and eat, buy something. I’ve lost some weight, because I walk everywhere already.

“The back of the van, there’s a little stove, but I just think it would look odd at 2 o’clock in the morning for this guy to have smoke coming out of the back of the van in the neighborhood,” Golstein said.

Before moving into the van, he rented a bed through Airbnb for $400 every two weeks in a room with three sets of bunk beds. Golstein, who said he was asked to leave the four-bedroom house in Los Altos Hills on short notice, compared living in that room to living in military barracks.

“Greed is a terrible thing in Silicon Valley. He put me in basically what would be equivalent to a teenager’s room,” Golstein said. “This guy wants . . . grown adult professionals to be jumping in and out of bunk beds every day? And you want $800 a month for one bed?”

At the time Golstein moved out, he said, the landlord planned on raising rent to $1,000 a month.

With a budget of around $1,000, Golstein figured he would pay $250 a week to rent the van while he looked for another place. He spends several hours a day at coffee shops to charge his phone and computer, but living in a 15-foot van comes with its challenges.

“The free time I have, I’m restricted. When I return to my abode, I’ve got 2 1 / 2 hours of time every night.”