Comedian Artie Lange, who has struggled with addiction for decades, revealed on Wednesday that he has been clean for 18 days and went on to perform a show before quickly returning to the rehab center for the Thanksgiving Day, saying he’s “fighting hard.”

“Guess who’s clean?!! Been clean 18 days!  The rehab I’m at let me use my phone to check things. I still have more time here but I’m doing great. I’m humble. Not bragging. Just feel well.  Tons of work ahead. Sunrise detox in Sterling, N.J., helped save my life!!!  They’re great!!” Lange tweeted.

The 51-year-old performed in New Brunswick on Wednesday. He said he was allowed to temporarily put a stop to his treatment at the rehab that day, an unusual privilege granted by the treatment center.

In a series of tweets, Lange described his experience at the addiction treatment center, praising the staff.

“I’m at The Retreat by Lancaster PA. This place is a Godsend! They’re not payin me. No free stay. They do it right. I’m so grateful to them. The nurses are Angels. I’m not saying I will never relapse. I pray every day!! Just happy to be alive. I ain’t checkin out yet! I love u all!” he tweeted.

“God. Grant me the serenity to accept the things I cannot change. The courage to Change the things I can. And the wisdom to know the difference,” he added.

But he is facing possible jail time after allegedly violating the terms of his probation, allegedly testing positive for drugs twice in October, according to NJ.com.

Lange pleaded guilty last year to heroin possession after police reported him having 81 decks of heroin. He was sentenced to four years of probation and 50 hours of community service. The judge also ordered Lange to enroll in outpatient rehab.

LEGENDARY COMIC ARTIE LANGE OPENS UP ABOUT ADDICTION, LEGAL TROUBLES AND HIS DEVOTED FANS

Initially, Lange agreed to participate in an outpatient treatment program, saying that will help him to continue working, performing stand-up comedy and appearing on HBO’s “Crashing.”

But he later announced that he will commit to an inpatient rehab program. “I'm about to take a big step to help myself,” he said earlier this month. “To save my life.”

Lange recently penned his memoir titled “Wanna Bet? A Degenerate Gambler's Guide to Living on the Edge,” in which he described the troubles sounding all of his life, including an attempted suicide in 2010.

“It's almost fully gone,” he told NJ.com in summer. “I can't say fully because I'm just a depressive person.”

After the comedy gig on Wednesday, Lange returned back to the rehab and gave up on his access to the phone, but only after he sent one last tweet.

“On way back to rehab,” he wrote. “Did show. Stayed clean. On way back. Another Thanksgiving inside someplace. Last one was jail. But I just killed for a huge crowd who felt like family. I'm fighting hard. Don't count Artie Lange out. Love u. Be back by end of month. I'm smiling. Thx”