You know him as Mulder from “The X-Files,” Hank Moody from “Californication,” his numerous cameos on “The Larry Sanders Show,” and, if we’re going way back, as the host of “The Red Shoe Diaries.” Now he’s stepping into his most personal role yet. Ladies and gentlemen: David Duchovny, singer-songwriter.
On Tuesday, the actor will release his debut album, “Hell or Highwater,” on the Boston-based indie label ThinkSay Records. The entire project, in fact, has local roots. His backing band includes Berklee-trained musicians who play in a group called Weather, including Colin Lee, who produced the album. They holed up last winter and recorded at Q Division Studios in Somerville.
“Hell or Highwater” is a mellow alt-rock album that draws on Duchovny’s influences, from Wilco to early R.E.M. A squall of electric guitar occasionally pierces the songs, which Duchovny wrote, but they are driven by his voice. He sings with a parched resonance and just a hint of rasp. By no means a belter, he is rather heartfelt.
Last Wednesday, Duchovny previewed the album with appearances in Boston, including an acoustic set at Google’s offices in Cambridge and in front of a full house at Cafe 939 that evening. The concert was abuzz with fans who didn’t know the songs but certainly felt like they knew the man onstage. Duchovny and his seven-piece band were routinely interrupted by cat calls, which he took in stride. He even played up his past by having the band riff on the opening theme from “The X-Files.” “Shameless,” Duchovny said with a shrug and coy smile.
It’s been a busy year for Duchovny, who published his first novel, “Holy Cow,” in February, and he stars in the new TV show “Aquarius,” which premieres later this month. This summer he’ll reprise the role that made him a household name when he films new episodes of “The X-Files” with Gillian Anderson.
Just before he went onstage at Google Wednesday afternoon, Duchovny sat down with the Globe for a quick chat about making the transition, at 54, from actor to rootsy rock star.
Q. Showtime is in 15 minutes. Do you feel nervous?
A. I don’t. I think because I’ve had so many failures and successes, I know at this point that they don’t actually kill you. That’s a good thing to know: Failure doesn’t kill you. I’m not sure I believe in the Nietzsche thing that it makes you stronger. (Laughs.)
Q. I have a confession: I have never seen a single episode of “The X-Files.” And I never thought we’d be sitting down to talk about an album you made.
A. I love that. And you didn’t think you were going to like it either, did you?
Q. Honestly? I was worried.
A. I was worried, too.
Q. You’ve said this project surprised you. What was going on in your life that inspired you to pick up a guitar and write some songs?
A. It was a combination of things. I’ve always wanted to pick up the guitar. I had this idea that I was musical, but I had no proof of that. I’ve had to work hard to carry my own tunes, and I can still go off the rails quite easily.
Q. Were you at least a singer in the shower?
A. I was a singer who was told to stop singing. All the time – by a teacher, by a spouse, by my kids, anyone around. “Oh, Dave. No, no.” What surprised me when I started to write songs was that I heard melodies. I didn’t know anything about writing songs or even playing guitar. And then I was going through a divorce [from actress Téa Leoni], so I was living alone and had my kids half the time. I had all this time and I wanted an outlet for feelings and disappointments, and just life. It all started to make sense that I was sitting in a room, playing a guitar and trying to play “Bell Bottom Blues” and songs I liked.
Q. Was it freeing to make a record knowing that this isn’t your main gig?
A. It was completely liberating. It wasn’t like I was concerned with a single or a remix. It’s not necessarily the music that you hear on Top 40, but there was never a moment where any of us tried to turn it into something else. Each song is a little story, so we focused on what’s the best sound for that.
Q. Because you’re a celebrity who has had some public struggles, some people will be tempted to read between the lines on these songs. Does that bother you?
A. I think the temptation is there for anyone who is known. I’ve had that happen with roles. People always want to know how much of that is you, and I don’t know. But the thing about writing lyrics is, some of it would be a thought about my life, but then the songs would take on a life of their own. Then the need to rhyme takes you in directions you wouldn’t normally go.
Q. This album is getting comparisons to Wilco, but how do you describe your taste in music?
A. I’m a child of when I was raised, and I stayed there. I was born in ’60 and was lucky to have a brother who was a little older. He made me listen to stuff that I would have hated. I listened to the Allman Brothers, the Beatles, the Stones. My first love was Elton John, and the first album I bought was “Don’t Shoot Me [I’m Only the Piano Player].” I also loved Steely Dan and Yes.
Q. Dead or alive, who would you love to go on the road with as the opening act?
A. Any of the great bands I love, like Tom Petty. But when you ask me that, it’s like, “Sure, I’m going to open for Tom Petty.” Led Zeppelin is going to get back together so that I can open for them. Yeah, that’s going to happen.Interview was condensed and edited. James Reed can be reached at firstname.lastname@example.org. Follow him on Twitter @GlobeJamesReed.