"She takes whatever steps she needs to make sure she stays healthy," a source tells PEOPLE
Credit: Christopher Polk/Getty

Demi Lovato is so determined to maintain her health that she’s been living in a sober house in Los Angeles – even while she was a judge on The X Factor, a source confirms to PEOPLE.

“She’s very smart,” says the source of Lovato, who underwent treatment for bulimia, anorexia and cutting two years ago. “She takes whatever steps she needs to make sure she stays healthy.”

The 20-year-old singer, who owns a Mediterranean style home outside of L.A., has been renting a room in the sober facility for more than a year, the source confirmed.

Lovato, who also learned she has bipolar disorder while she was in treatment from Nov. 2010 to Jan. 2011, has been very open about her struggles.

“I take it day by day. I’d be lying if I said there weren’t days where I just want to stay in bed all day because I’m ashamed of my body,” she told PEOPLE in an interview after leaving treatment that year. “It’s a struggle I’ll probably have to deal with for the rest of my life. But I have so much life to live; I don’t want to waste it.”

It’s unclear how long Lovato plans to live at the sober house, but the former Disney Channel star – who tattooed “Stay Strong” on her wrists – is committed to her health, says the source.

TMZ was first to report that Lovato is living in a sober facility.