Joy and Dick Moore’s children moved out of the family’s four-bedroom Victorian in New York years ago, but the couple — now retired — haven’t downsized.

Instead, in 2014, the Moores listed one of their rooms on Airbnb, a vacation rental website.

“We have a big house and the rooms are basically not used,” Joy said. “And we thought, what a waste! The village where we live has become quite a little destination, and there’s only one boutique hotel here.”

They’ve since rented to a variety of visitors, many of them from nearby New York City. “We thought it would be a wonderful way, instead of going to many places to meet people, to bring them here,” Joy said. “It’s travelling without leaving home.” And of course, the additional cash is a nice bonus.

Renting out part of your home — particularly if you have a separate space such as a basement or garage apartment — can be a great way to supplement your income. It might allow you to take on a larger house than you could otherwise afford, to live in an expensive area, afford a splurge, or perhaps just save more.

“All sorts of people rent out rooms,” said Matt Hutchinson with SpareRoom.co.uk. “Some people rent out rooms for the extra cash they could live without, but that affords them a nice holiday or a new sofa.”

The arrangement is increasingly common. Almost a third of all US households contain adult roommates, up from 25.4% in 2000, according to a report from US real estate site Zillow.com. And short-term rentals — such as those listed on Airbnb.com — are skyrocketing. In late 2014, Airbnb said more than 25 million guests had used its services since its launch in 2008. The site lists short-term rentals in more than 190 countries.

Nonetheless, taking on a tenant for any length of time has risks as well as rewards. Here’s how to make it work for you.

What it will take: You must be comfortable sharing your living space with someone else. And you’ll have to do your due diligence to make sure you’re letting to the right person and that you’re protected legally and financially. Even if your tenant is in a separate apartment, it’s usually attached to your home, so you may hear or run into each other frequently.

How long you need to prepare: You’ll need long enough to make sure the room or apartment you’re renting meets legal tenant requirements in your area, plus enough time to advertise for, find and screen applicants.

Do it now: Protect yourself. A paying tenant in your home may not be covered under your regular homeowners’ insurance policy — you may need landlord insurance or similar. That’s true whether you’re putting a long-term tenant in place or renting a room on a short-term basis, such as listing it on Airbnb.com. Talk to your insurer about the right product for your needs.

“Consider if there was a fire because of something the tenant did,” said Max Galka, co-founder of US real estate site Revaluate.com. “Or even if the tenant steals something.” Also, call your home loan provider — many mortgages have stipulations that require borrowers to notify them if they change the use of the property.

Collect a security deposit. “This is usually equivalent to a month’s rent and protects you against the cost of damage to your property and furnishings,” Hutchinson said. If a tenant leaves a hole in a wall or owns a pet that destroys the carpets, you won’t be left empty handed.

Know the landlord laws. The laws differ from place to place regarding what’s required of landlords, so research local bylaws and regulations in your area. You may be required to provide a specific amount of heat in the winter or to return a security deposit within a specific time frame, and you could get sued by a tenant for noncompliance. Some areas require that rented space within an existing property, such as a basement or garage apartment, have its own separate entrance. And check the regulations in your state and city, you might find that tenants have rights after renting for a certain period. (Consider the case of one California resident whose Airbnb renter claimed squatters’ rights after 30 days in her apartment.)

Make it official. Under no circumstances should you proceed without a rock-solid lease agreement. “The cool person you met on Craigslist may not turn out to be whom you thought they were,” said April Masini, a relationship expert and advice columnist at US site AskApril.com. “Your lease should have a start and end date.” Spell everything out in the lease, even things you think are assumed. “In other words, prepare for the worst and hope for the best,” Masini said.

Consider starting with a six-month lease or shorter so you can both re-evaluate at lease-renewal time if you find your tenant isn’t a good fit for you or the space. If you’re considering very short-term rentals, such as those on Airbnb, check your local laws — night-to-night renting may violate zoning or other regulations, depending on where you live.

Put away money for repairs and maintenance. Like any property, there will be costs for upkeep, particularly once you add extra people to the space. This sometimes sneaks up on people because they hadn’t counted on having to do repairs in their own homes, but as a landlord, you’re often responsible for fixing issues quickly. Set aside a percentage of each rental payment for repairs.

Do it later: Talk to a tax professional. Renting out part of your home for cash has tax consequences—you generally must report the income and pay taxes on any profits you make after expenses. “People are often surprised when they owe money at tax time,” said Shannon Lee Simmons, a financial planner with Simmons Financial Planning in Toronto. “But you also get to write off expenses, so do your homework and start keeping those receipts.” Laws vary by location, however. In the UK, for instance, you only have to fill out a tax return if the rent comes to more than £4,250 ($6,421) per year.

Do it smarter: Don’t skip the background check. That potential tenant may seem quiet and lovely, but you have no way of knowing that for sure. And once a tenant is in your space, it’s very hard to get him to leave. “It’s not as simple as calling the police to come and take them out,” Galka said. “Eviction is a very long, drawn-out, expensive process.”

Ask each applicant for an employer’s reference, previous landlord references, bank statements and a recent credit report.