With Valentine’s Day coming up, it’s hard not to look at the couples who have been together for two, three, four decades and wonder: “How do they do it?”

Having a long-lasting marriage is an accomplishment in itself, so it’s even more amazing when a couple also manages to run a successful company together. Yet it’s been estimated that at least 3 million U.S. small businesses are jointly owned by couples.

Although spending all your time with the one you love sounds like a great thing, most people recognize that when sharing both a bed and a business, challenges are bound to arise. Fortune talked to four couples who run companies together to find out how they make it work. Here’s what we learned:

Having separate, complementary roles is key.

For Jessie Randall, co-founder of indie shoe and handbag brand Loeffler Randall, having a clearly defined role in the company she and her husband Brian Murphy founded is what makes it possible to work together. “Brian and I have really complementary skill sets,” she says. “I’ve always headed up creative and design. He really runs the business, oversees e-commerce and sales. The one place where we work together is marketing.”

Loeffler Randall co-founders Brian Murphy and Jessie Randall

Forget trying to create a work-life divide.

Trying to separate work and family when your work is your family is pretty much impossible. Julia Hartz, CEO of ticketing site Eventbrite, which she co-founded with her husband Kevin Hartz, says she doesn’t even try. “We focus on Eventbrite and our family. That’s how we spend our time, full stop. The nature of business today is that the lines of ‘work’ and ‘life’ are a little more blurred.” When you add kids to the mix, things get even more complicated: “Work does come home with us, but home also comes to work. Our kids are regulars at Eventbrite’s HQ in San Francisco,” Hartz says.

Eventbrite co-founders Julia and Kevin HartzCourtesy of Eventbrite

 

Setting aside “couple” and “alone” time is a must.

When you’re married to your business partner, it can be easy to go days without spending time as a couple—or as an individual. For Ava DeMarco and Rob Brandegee, co-founders of sports apparel company Little Earth, setting aside time for both helps keep their relationship grounded. The pair makes it a point not to commute together (“Sometimes it’s the only time of the day where we’re not together,” explains Brandegee), but sets aside one day per week to go out for lunch together, with the stipulation that they will not talk about work (“for one whole hour!” says DeMarco).

Little Earth co-founders Ava DeMarco, Rob Brandegee and their two daughters.Courtesy of Little Earth

Sign up: Click here to subscribe to the Broadsheet, Fortune’s daily newsletter on the world’s most powerful women.

Love really does conquer all.

At the end of the day, running a business together means you see your significant other a lot, so enjoying each other’s company is crucial. For Sam Calagione, founder and CEO of Dogfish Head Craft Brewery, bringing his wife into company was the best business decision he ever made. “The company wouldn’t be where it is today if I didn’t have her,” he says of his high school sweetheart and Dogfish Head vice president Mariah Calagione. “There’s nothing like working with someone you know is completely on the same page.”

Dogfish Head Craft Brewery founder and CEO Sam Calagione and his wife and VP of Marketing, Mariah CalagioneCourtesy of Dogfish Head Craft Brewery