`When I think of a community I think of two things. One is a physical place where people live, work, shop,etc. and have some kind of organized civic system. The other is a group of people who don't necessarily live close together, it could even be national, but have a shared set of values, goals, identities and life-styles. So, for LGBT's the closest thing to the former definition of community in the 19th century was none other than San Francisco.
From it's very beginning San Francisco was an ''outlaw'' town and it's history of tolerance for LGBT's goes back to it's beginning, too. This tolerance for LGBT's stemmed from a relaxed attitude toward any illegal activities. It was a male dominated city for most of the 19th century with a high percentage of racial and ethnic diversity. But there was a lot of racial tension and prejudice and there was a slave trade going on, too. People were being kidnapped and forced into seamanship or taken to China for slave labor. If you were taken you were ''shanghaied.''
People, mostly men, flocked there in 1849-50 looking for gold and the population kept growing from then on. The cities tolerance of same-gender love and different forms of gender expression stemmed from it's constantly changing social demographics. In 1850 same-sex dancing and what we call ''drag shows'' were common and considered acceptable. This is not to say that LGBT's could walk down the street holding hands and there were no legal protections.
There is a school of thought, and I personally agree with it, that says LGBT communities thrive in economies/environments where income is not dependent on the family unit or ''family farm'' for survival. Most 19th century Americans lived on family farms. People who lived in urban areas had to work in trades but most, if not all, other cities enforced their sodomy laws. There was no same-sex dancing and drag shows in the Eastern cities. But if you couple independent labor with a relaxed attitude toward ''sodomy'' and gender expression it makes sense that some semblance of an LGBT community would blossom.