If the starry list of past clientele led Kevin Spacey and Harvey Weinstein to expect four-star accommodations in the all-male sex-addict facility, Gentle Path at The Meadows, they must have been sorely disappointed.

The dorm-style, two-person rooms are reminiscent of those found in a midlevel hotel, and electronics get surrendered at the door. Books and magazines — due to their potential to trigger sexual thoughts — are verboten as well.

“There are no VIP rooms or special areas for famous people,” a source told The Post of the rehabilitation and treatment center, where Spacey is reportedly being treated for sex addiction. Speaking under the condition of anonymity, the Oklahoma man explained that he enrolled in Gentle Path after nearly destroying his marriage by cheating on his wife and frequenting brothels. (Women with sex-related issues get treated at a separate location at The Meadows.)

“I was there with professional athletes and two members of royalty. If Harvey Weinstein was there, I wouldn’t even have known who he was. You go by first name only,” he said. “Everybody is treated the same.”

Photos emerged this past week of Spacey — accused by multiple men of sexual assault and harassment — carrying a yoga mat at the facility. In mid-October, Harvey Weinstein was there as well, although reports indicate the disgraced movie mogul, who is accused of harassing, assaulting and raping dozens of women, may have since transitioned to an outpatient program.

Celebrities and one-percenters have helped turn The Meadows into one of the top refuges of choice for beleaguered bold-facers.

Stars who’ve retreated to the Wickenburg, Ariz. (some 60 miles northwest of Phoenix), facility to repent at the sex-addiction wing also include Tiger Woods. Rush Limbaugh showed up to battle a prescription pain pill addiction, Kate Moss and Donatella Versace for cocaine, Elle Macpherson for depression and Selena Gomez to recover from chemotherapy treatments related to lupus. (The Meadows also offers treatment for pathological gambling and eating disorders.)

The former patient, who stayed at The Meadows three years ago, remembered starting each of his 45 days at the center at 5 a.m. with a workout in the gym, which is loaded with treadmills, free weights, elliptical machines and exercycles but no personal trainers. Patients eat breakfast at 7 a.m. — a buffet of scrambled eggs, yogurt, granola and fruit — and chat about their plans for the day and their progress. Lunch and dinner tend to be salads and hot dishes such as broiled fish and vegetarian options; quinoa is said to be a popular protein.

They might read newspapers, but Spacey won’t have to worry about anyone scrutinizing his transgressions. When The Post’s source was in residence, “The staff cut out stories that pertained to a couple of [athletes in the program]. And there was no TV news.”

Right after breakfast comes meditation, designed to teach patients to refrain from snap decisions that lead to destructive behavior, followed by something known as “community,” which is led by a therapist.

Men in the program are restricted from wearing shorts, so as not to create sexual triggers among each other. The source says he witnessed no carnal interactions among his fellow male patients.

“We gathered in a conference room and acknowledged who we were,” said the source. “You’d give your name and your core behavior — prostitution, porn, cheating, whatever it was — and come up with something that you wanted to talk about.

“Maybe you’d discuss a certain trigger, like that if you leave the office stressed you always stop at a massage parlor or a strip club. There were guys there who would spend $50,000 or $60,000 a night on strippers. Then you work to come up with a way of dealing with the trigger. A suggestion might be to take a different route home or call your wife and tell her you’ll be there in 20 minutes.”

The Meadows’ sex rehab treatment includes trips to the Art Barn, where patients drill down on their problems through creativity. “You’d get an assignment to draw something depicting things or thoughts that trigger sexual behavior. It seemed corny at first, but it turned out to reveal some hard truths,” said the source.

“People would draw strip clubs and strippers, and they’d talk about what went on in their lives with these places. In some of the drawings you’d see real pain, guys illustrating their dads abusing them or watching them. People would start out saying that they didn’t want to draw because it seemed silly and they weren’t good at art — then, in the end, they’d have everyone in the Barn crying.”

Along with group therapy, individual therapy and classes to learn the physiological reasons for sex addictions, there are also less expected treatments.

Eye movement desensitization and reprocessing (known as EMDR), for one, uses the sensory input of flashing lights and beeping sounds to, per The Meadows’ Web site, “change the way the brain responds to external stimuli.” The treatment, which also is used for post-traumatic stress disorder, is designed to unlock repressed memories of disturbing experiences in which sex addictions may be rooted.

Equine therapy — which Anthony Weiner participated in at a Meadows-style facility called Recovery Ranch in Nunnelly, Tenn. — encourages sex addicts, many of whom may be emotionally calloused from their desires to deceive loved ones, to rediscover how it feels to take care of another living being.

“You go into a big arena and there are horses,” said the source. “Ten of us spent 20 or 30 minutes walking around and interacting with the horses. We got a sense of their personalities and talked about it when we got back. You talked about how the horses responded to you and then tied it back to your life, to how you interact with people at work and with family members.”

The source acknowledged that 45 days at Gentle Path can feel a bit like summer camp, and he pointed out that spouses, stuck at home and cleaning up their partners’ problems, don’t always appreciate it. Patients are allowed one 15-minute call per week, and it takes place in a common room where others can overhear.

“It allowed us to police one another,” he said.

‘One guy called his wife and told her about his day in equine therapy. She blew up and was so loud that we all heard her. She said, ‘I don’t want to hear about f – – king horses!’

The lack of privacy can be embarrassing: “One guy called his wife and told her about his day in equine therapy. She blew up and was so loud that we all heard her. She said, ‘I don’t want to hear about f – – king horses! I’m stuck here dealing with the bankruptcy you created.’ ”

Hopefully, he didn’t mention the tai chi lessons, the occasional barbecue or the “free time” that the guys spend poolside (a patient got reprimanded by other patients for sharing dirty stories there that could serve as triggers, said the source).

Nights involve Sex Addicts Anonymous meetings — the 12-step program is a key component of Gentle Path’s therapy — and patients use the hours before bed to “draw timelines of how our sexual addictions started and progressed and what triggers us,” said the source. “We would write about where we hit bottom and who we affected. Doing all that, I realized that my marriage needed to be saved.”

That is the sort of revelation that a group of doctors had in mind when they launched the Meadows in 1975 (Gentle Path was founded in 2013). It was run by Pat Mellody, a veteran Air Force navigator who got into the drug- and alcohol-rehab business by designing programs aimed at helping addicted Vietnam veterans. Mellody had met Bill Wilson, the founder of Alcoholics Anonymous, through his father — an alcoholic — and, as Mellody told the New York Times, rehabilitation “was just always a part of my makeup.”

The place originally was designed to deal with wealthy people who had drinking and drug problems. Now, it augments the usual menu of maladies with more esoteric concerns, including love avoidance and codependency. Patients get issued beepers that remind them when to go to the next round of therapy, lunch or free time.

One reason why the place attracts celebrities and high-profile executives is because they’re the ones who can afford it. The cost of being treated at Gentle Path is a not-so-gentle $58,000 for a 45-day stay.

According to Joe Schrank, co-founder of TheFix.com and a sobriety coach based in East Hampton, LI, the celebrated clientele has to do with a combination of good marketing and a strong program.

“Celebrities do not cruise the Internet, searching for where to go for rehab,” Schrank said. “They get advice from their people. The Meadows is respected, in part, because it has groundbreaking doctors like Patrick Carnes [the founder of Gentle Path who is said to have coined the term ‘sex addict’] and markets to individual therapists in high-income Zip codes. I wouldn’t be surprised if they market to agents and managers as well. This is a business, just like booking conventions into hotels. They bring you out to see the facility and to meet the clinical staff. Plus, they do a good job and there is a limited number of places that treat sex addiction.”

Still, some experts say that celebrity offenders don’t always show up to rehab for the sincerest of reasons. “A lot of these people go in because it’s something for their publicists to say [as public retribution],” said Schrank. “However, they can actually gain insight from the clinical process if they are open to it.”

Stays at Gentle Path end with a modest graduation ceremony.

“[Patients] talk about significant moments in their treatment,” Meadows spokesperson Patty Evans said. “You receive a goody bag with a journal and a medallion that serves as a memory of your time spent here.”

Afterward, the question remains as to whether patients can repair their relationships and reputations.

The Oklahoma source has managed to save his marriage and tamp down his sexual compulsions. He acknowledged, however, that he is not exactly cured.

“It’s still there,” he said of his compulsion. “I see an attractive woman and take [flirtatiousness] a little further than someone who is not sexually addicted. But I have learned to respect boundaries and understand that every beautiful woman I sit next to on an airplane does not want to hear my life story.”