BARNSTABLE (CBS) — For the first time in years, Brian Adams is living his life free of opioids and alcohol. “It’s a life or death thing. I have to stay sober,” he said.

The Barnstable resident said he owes his sobriety to the people he met at The Miller House, a transition facility run by the non-profit Gosnold Treatment Centeron Cape Cod. “As long as you have the right people around you and they are doing all the right things, then your success for staying sober is that much greater,” he said.

Adams completed his time at Miller House and has since moved out, but he still has the support of the people he met and others in the recovery community thanks to an app run by Gosnold. “It makes me feel plugged in. I’m never alone,” he said.

The app is called Connections and it does just that: keep patients connected with peers and licensed counselors at Gosnold. Each morning when a patient opens the app, it asks if they are likely to relapse that day. “If the answer is yes, then it red flags to one of our coaches, one of the people manning the app,” explained Allie Anderson, head of clinical services at Gosnold.

According to Anderson, a licensed caregiver is monitoring the app 24-7 and is able to reach out to anyone who may be struggling.

“It’s helped me tremendously,” said John Masone of Quincy, who has also been battling addiction for years. He said connecting with other people in recovery helps him stay sober. “I wake up every morning and I check the app to see who is struggling,” he explained. By helping others, Masone says it keeps him focused on his own recovery.

Users can remain anonymous or use their real name on the app. In addition to keeping patients connected with their peers, it can also be programmed to alert a patient if they are nearing an area that they have designated as a trigger point. “Local corner stores or places where they have used before or people that are triggers for them, their houses or locations,” Anderson explained.

Both Adams and Masone believe the app is playing a big part in keeping them sober. “It makes you feel safe so that if you are in a risky situation, you always know you can click on that and someone will reach out to you,” Adams said.

“For someone who has been in recovery for many, many years and tried many things, this is probably the most important thing I’ve ever tried,” he added.

The app was developed by Chess Health and Gosnold is offering it for free to about 100 people. They plan to expand the offer to more than 2,000 current and former patients.