What’s more romantic than a warm fire on a cool summer evening? If you’ve been eyeing an outdoor fire pit or considering building one into your back patio, you’re not alone: Fire pits and fireplaces are the top new trend in outdoor living, according to a 2013 study by the American Society of Landscape Architects. But you’ll want to use them carefully to avoid igniting more than a night of passion or a few seasoned logs.

Keep your home and family safe with these tips.

Related: Is Your Fireplace Safe?

Check out the law. Before you rush out to buy or build a fire pit, “check with your town to see if there are any laws governing their use,” says UL consumer safety director John Drengenberg. Some towns only allow certain styles of fire pits; others have strict rules on how and when they’re used.

If you’re planning a custom outdoor fireplace, some jurisdictions even have specific building codes that dictate where they’re placed and how they’re made. Avoid making a costly mistake by learning the law before you shop.

Avoid a dangerous tip-over. An outdoor fire pit can be as simple as a bare patch of yard surrounded by stones or a hollow metal bowl on legs. A chiminea resembles an enclosed wood stove with a short chimney, and an outdoor fireplace is most often built of stone or brick and installed in a permanent location.

“Any style is safe when positioned and used properly,” says Drengenberg. “But if you buy a fire pit with freestanding legs, make sure they’re sturdy or be prepared to secure the structure in place with stones on the feet.”

Pick a safe spot. “For starters, make sure your fire pit is at least 10 feet from your house, garage, or any other outdoor structures,” Drengenberg says. “But bear in mind that on a windy day, lit embers can easily fly 25 feet or more.”

Finding a level spot is essential, and you’ll want to clear away dried leaves or debris and make sure there are no limbs or branches hanging over the pit. If possible, build it on stone or brick in an open spot away from trees.

Beware the risky deck and balcony. Many cities and counties don’t allow open flames on a deck, and for good reason: Flying embers can smolder unseen in the debris between deck boards or land on roof shingles, eventually blazing into a fire. If you’re determined to put a fire pit on your wooden or composite deck, experts recommend using a gas-fueled pot for the lowest fire risk.

In addition, make sure to find a spot that’s at least 10 feet from your house and several feet from a railing or overhang. Never put a fire pit directly on a wooden or composite deck: Protect the deck by using paver stones (mortared together) or a protective fire mat that extends at least 2 feet in all directions. Use flame-resistant fire rugs over more of the deck if you can.

Never use the fire pit on your deck on a windy day or without a spark screen — and don’t leave it unattended, even for a minute.

Related: Quiz: Are You Prepared for a House Fire?

Take your time with the lighting. “It can be very frustrating and slow to build a safe fire,” says Drengenberg. “But never be tempted to use starter fluid, gas, or kerosene [in a non-gas fire pit], all of which can cause major flare-ups and serious burns.” Instead, start with a small amount of crumpled paper and dry kindling sticks, then gradually work your way up to larger logs. You should also check the wind direction before starting a fire and warn your neighbors of your plans, Drengenberg says.

Watch what you add to the fire. As the night goes on, it can be tempting to drop larger and larger logs onto the flames. “Be careful not to overload the pit or put in a log large enough to cause it to tip over,” Drengenberg warns.

And while it’s fine to use a small amount of paper to start a fire, Drengenberg advises that you be mindful of what you add. “It’s not a garbage disposal: Items like large chunks of paper can catch fire and blow away, which can ignite wood structures or roofing shingles.”

Keep an eye on those flames. Once the fire is going, make adjustments and add seasoned firewood, using long tongs designed to withstand direct contact with flames.

Adults will naturally be wary of jumping flames and keep a cautious distance from the fire, but children and pets are a different story. “It’s important to explain the dangers of the fire to children and to keep young kids and pets from playing near the fire pit while it’s in use,” Drengenberg says.Equally crucial: never leave the fire unattended, and always have water, sand or a fire extinguisher on hand in case flames spread or get out of control.

Related: 3 Ways to Make Sure Your Fire Extinguisher Would Save Your Life

Dispose of the embers safely. As firekeeper, you’ll need to watch the fire until all the logs have burned out, then allow the embers to cool fully. In a fire pit, you can use a small amount of water to extinguish embers, but don’t pour water onto a ceramic fireplace or chiminea, which can crack from the sudden change in temperature.

Transfer the cool embers to a fireproof receptacle like a metal can with a metal lid on top. “Putting embers into a paper bag or regular trash can is a recipe for a fire,” says Drengenberg, “particularly if you put the can into a garage or near the house and leave it unattended.”

Paul Hope, a trained chef and DIY enthusiast, has restored two houses and writes about food and homes.