Co-ops, New York’s snobbiest institution, are cracking down on coronavirus.

From Fifth Avenue to Harlem, co-ops have become veritable castles. They are introducing the toughest rules in the city, obsessively sanitizing everything — including doormen themselves — and effectively creating moats to protect themselves from outsiders.

“I sold an apartment to a client on Fifth Avenue and they are literally not letting anyone but owners enter the building,” says Upper East Sider Philip Scheinfeld, a broker at Compass, who noted that buildings are constantly adding strict regulations as the crisis in New York evolves.

Even workers that are technically classified as “essential” by the governor, such as movers, are being blocked by board rules banning moves-ins and move-outs, trapping some co-op owners in a costly limbo, a lawyer representing a board tells The Post.

The pandemic also means that doormen at these buildings are being asked to pull double — or even triple — duty.

“These buildings that have a doorman, an elevator man and a concierge are cutting down to just the doorman,” Scheinfeld says. “Those people go home and leave the building at night, so it’s a way to limit exposure to just one person. The doormen are all wearing gloves and masks now.”

Doormen are now personally delivering food to doors, sanitizing packages that come in and even flushing toilets periodically to maintain the pipes for owners who have fled to the Hamptons.

But come Christmas time, Scheinfeld adds, all will be made right.

“Doormen at these white-glove buildings have often been there for 20 or more years,” Scheinfeld says. “They are like family. I’m not worried that these guys won’t be taken care of.”

But doormen aren’t the only co-op insiders getting crushed by corona. Some shareholders are even suing a neighbor who refuses to get in line with their restrictions.

Mike Seltzer, 52, a faculty member at Columbia University’s music school, who owns a penthouse in the 76-unit Hamilton in Harlem, is learning first hand about the litigious approach his board has taken to combat COVID-19.

The trombonist — who played with the likes of Sting, Lenny Kravitz, Mos Def, Bernadette Peters and David Byrne — is facing a first-of-its-kind lawsuit, accused by his own co-op board of not adhering to the building’s new ultra-strict protocols put in place last month. Those rules ban all “non-essential” guests from entering the building, including family members.

The board claims that Seltzer’s “outrageous and despicable conduct,” which allegedly includes flouting social-distancing rules by hosting drug-fueled parties in his apartment, is “propagating COVID-19 … placing the life and safety of the building’s residents, some of whom are elderly or who have underlying health conditions, in grave danger of serious injury and death,” according to the lawsuit, written by Massimo D’Angelo, the lawyer representing the Hamilton. The suit was filed last week in Manhattan Supreme Court by the Hamilton Owners Corporation.

Specifically, Seltzer’s neighbors claim that he has been sneaking unauthorized guests into the building through the basement and garage, defying security guards when confronted and even handing out his key fob to friends. Those friends are accused of loitering in the building, “incessant buzzer ringing,” making a nuisance under the influence of drugs and alcohol (“possibly a psychedelic or LSD,” according to the suit) and even dropping drug paraphernalia in the halls.

Seltzer did not return The Post’s requests for comment.

The Hamilton’s board can’t boot Seltzer from the building due to the city’s eviction moratorium, but they are seeking an emergency injunction forcing him to abide by the building’s rules or else face arrest.

“Once the judge signs this, it becomes a court order and I can move to hold him in contempt of court and have him thrown in jail,” says D’Angelo.

It’s not just NYC buildings that are laying down the law. Florida’s co-op-dwelling snowbirds embrace a like-minded vigilance.

“Our building took the lead on this,” says Christine Schott Ledes, a New Yorker who is weathering the COVID-19 storm in Palm Beach co-op Harbour House. “Upper income areas are generally better educated, and we took precautions earlier.”

The building banned personal staff, guests and social gatherings. It also closed the pool — to the chagrin of many. “It was frowned upon to let my children come,” Ledes says. “That was hard, but I abided by it, of course.”

She adds that the closings of beaches, golf courses and trendy restaurant Swifty’s also hurt morale. After all, the poolside chaises were already moved 10 feet apart to respect social distancing rules. The upside, though, is that Harbour House feels clubbier than ever.

“We call it ‘the dorm,’ ” she says. “It’s all these old preppies who went to boarding school all living here now. We have Amy Hoadley, Averell and Kirsten Fisk and Sharon Bush. It’s all fun New York people. We used to walk on the beach, now we walk on the par-three golf course. We count our blessings every day.”