DAMASCUS, Syria — On a cool evening in early November, in a back room of the Damascus Opera House, a women’s choir was rehearsing an old favorite, a sunny ballad from a childhood cartoon. When they reached the chorus — “How sweet it is to live in one house, how sweet to live in one hometown” — one of the singers, Safana Baqleh, began to weep into her hands.

The song reminded her of all that she had lost. Her closest friends had either left Syria or blocked her on Facebook over political disagreements. Sometimes, the solitude felt crushing. “I want to take my baby for a walk, but I have no one to visit,” Ms. Baqleh said. “No one. Absolutely no one.”

After more than six years of war, nearly a fourth of all Syrians live in exile. The loneliness of those who remain hangs like thick fog over Damascus, the capital. Lifelong Damascenes wonder why they are still here, when so many friends and family have packed up, died or disappeared. Newcomers, displaced by the war, move cautiously, unsure about their fate, or who is who.

I traveled to Damascus recently on a rare visa issued to an American journalist. I was almost always accompanied by a government-registered escort, which seemed to make some people reticent, and there were parts of the city I wasn’t allowed to visit.