OAKLAND, Calif. — This summer, the median rent for a one-bedroom in San Francisco’s cityscape of peaked Victorians soared higher than Manhattan’s, sent skyward by a housing shortage fueled in part by the arrival of droves of newcomers here to mine tech gold.

And so, as the story of such cities goes, the priced-out move outward — in New York City, to Brooklyn and, increasingly, to Queens. For San Franciscans, the rent refuge is here in Oakland, where the rates are increasing as well — so much so that young professionals are living in repurposed shipping containers while the homeless are lugging around coffinlike sleeping boxes on wheels.

These two improvised housing arrangements have emerged in an industrial pocket of Oakland where the median rent has gone up by 20 percent over the past year. One, in a warehouse, is called Containertopia, a community of young people who have set up a village of 160-square-foot shipping containers like ones used in the Port of Oakland. Each resident pays $600 a month to live in a container, which can be modified with things like insulation, glass doors, electrical outlets, solar panels and a self-contained shower and toilet.