Can I Put a Shed Right Next to My House? Setbacks, Egress, and Permits

In almost every jurisdiction, the rules for a shed next to the house prohibit placing it flush against the wall. Building codes and zoning ordinances require a gap, and the size of that gap is driven by fire-separation rules, property-line setbacks, and how your local building department classifies the structure. A common minimum is somewhere between 3 and 10 feet, but the exact number depends on the code your municipality has adopted and any stricter local amendments.

The Minimum Gap Between Shed and House

Fire safety is the main reason codes care about how close a shed sits to a dwelling. The International Residential Code’s Table R302.1 sets tiered requirements based on the distance from an exterior wall to the nearest adjacent structure or property line:

  • Less than 3 feet: exterior walls must carry a one-hour fire-resistance rating with exposure from both sides, no openings (windows, doors, or vents) are allowed in that wall, and penetrations must comply with firestopping requirements.
  • 3 to 5 feet: walls do not need a fire-resistance rating, but openings are capped at 25 percent of the wall area facing the adjacent structure.
  • 5 feet or more: no fire-resistance rating required and openings are unlimited.

A one-hour fire-resistance rating typically means lining the interior of the shed walls and ceiling with 5/8-inch Type X gypsum board or using non-combustible siding like fiber cement on the exterior. Those upgrades add real cost to what might otherwise be a simple storage building. Moving the shed a few feet farther from the house often eliminates the requirement entirely.

Some jurisdictions amend these thresholds. A few require fire-rated construction for any accessory structure within 10 feet of a dwelling, regardless of what the base IRC says. Zoning ordinances often layer on their own separation requirement between an accessory building and the primary dwelling, commonly in the range of 5 to 10 feet, measured from the nearest point of each structure’s exterior wall. When an accessory building sits closer than that threshold to the main dwelling, it often has to meet the same side-yard and rear-yard setbacks as the house itself rather than the more relaxed accessory-structure setbacks.

Attached Sheds Are Treated as Additions

If you physically connect the shed to the house by sharing a wall, a roof line, or a foundation, most building codes reclassify it as an addition to the primary dwelling rather than a detached accessory structure. That reclassification is significant. An addition has to meet the full setback requirements for the main house, which are almost always larger than those for a freestanding shed. It may also trigger stricter foundation requirements, including continuous frost-depth footings rather than simple pier blocks or a gravel pad.

A lean-to bolted to the house wall looks like a space-saving move, but it pulls the entire structure into a more demanding permit and inspection category. Keeping even a small gap between the shed and house preserves the accessory-structure classification.

Property Line Setbacks Still Apply

The gap to the house is one constraint. The gap to the property line is another, and on narrow lots the two can collide. Side-yard setbacks for accessory structures are frequently 3 to 5 feet from the property line. Rear-yard setbacks follow a similar range for smaller sheds, though some areas require the same rear setback as the primary residence when the shed sits close to the house.

If your home already sits at or near the minimum side-yard setback, there may be no legal room for a shed between the house and the property line without a variance. A variance is a formal request to deviate from the standard rules; it involves a hearing, isn’t guaranteed, and takes weeks or months.

Watch Out for Bedroom Egress Windows

A placement issue that catches people off guard: putting a shed directly outside a bedroom window can block an emergency escape route. The IRC requires every bedroom to have an emergency escape and rescue opening, and that opening has to provide a usable path to the outside. For emergency openings under overhead structures like decks or porches, the code requires a clear path at least 36 inches high leading to open space.

The code doesn’t set a specific setback between a shed and an egress window, but a shed wall two feet from a bedroom window functionally defeats the purpose of the escape opening. Building inspectors notice, and it can lead to a failed inspection or a requirement to relocate the shed. Before finalizing placement, walk the perimeter of the house and note every bedroom window.

Drainage in Tight Spaces

Placing a shed close to the house creates a drainage problem that doesn’t exist when the shed is farther away. The IRC requires impervious surfaces within 10 feet of a building’s foundation to slope at least 2 percent away from the foundation. A shed roof collects rain and dumps it in a concentrated stream, and when that stream lands near the house foundation, it can cause water intrusion, basement leaks, or soil erosion.

If the shed goes within 10 feet of the house, plan for gutters on the shed or a gravel drip edge that directs water away from both foundations. In tight spaces where the standard 10-foot graded slope isn’t achievable, a French drain or swale between the structures can carry water to a safe discharge point. Building inspectors increasingly check drainage during final inspection.

Easements and HOA Rules Can Override Zoning

Your property deed may include easements that restrict where you can build, regardless of what zoning allows. Utility easements give electric, gas, water, or sewer companies the right to access buried lines running through your yard. Drainage easements protect the flow of stormwater across properties. Building on either is prohibited, and if you place a shed over a sewer line or electrical conduit, the utility company can require you to remove it at your expense when they need access. A title search or your original plat map will show where easements run; the local planning office can usually pull the information if you’re unsure.

If the property is in a planned community, the homeowners association’s rules often matter more than the municipal code. HOA covenants can prohibit sheds entirely, restrict them to certain materials or colors, cap their size below what zoning allows, or impose separation distances wider than the local setback. Some associations require a buffer of 15 feet or more from the primary dwelling even when the building code would allow 3 feet. Enforcement typically involves escalating daily fines and, eventually, legal action to compel removal. Review the community’s Covenants, Conditions, and Restrictions before breaking ground; the architectural review committee usually needs to approve plans first.

When You Need a Permit

Not every shed needs a building permit, but every shed still has to comply with placement rules. The International Residential Code exempts one-story detached accessory structures that do not exceed 200 square feet in floor area and 15 feet in height from structural permit requirements. Many local building departments follow that threshold; some set the cutoff lower at 120 square feet, and some eliminate the exemption entirely.

A quick call to the local building department confirms which rule applies. Skipping the permit doesn’t mean you can ignore setback and fire-separation requirements. Those apply to the structure regardless of whether the paperwork does.

When a permit is required, you’ll typically need a site plan showing the exact location of the house, property lines, easements, and proposed shed, with labeled distances so the reviewer can check setback compliance without visiting. Construction details cover dimensions, height, foundation type, and materials. If fire-rated construction is triggered by the placement distance, the plans have to specify the fire-rated materials. An inspector will visit after construction to confirm the shed matches the approved plans: correct location, proper setbacks, required materials, and adequate drainage.

What Happens If You Build Too Close or Skip the Permit

Building without a required permit, or in a location that violates setback rules, creates problems that compound over time. The immediate risk is a code enforcement notice, which can carry daily fines until you either obtain a permit retroactively or remove the structure. Fines vary widely by jurisdiction but can reach several hundred dollars per day.

The bigger consequences show up at sale. Appraisers may exclude unpermitted structures from the property valuation entirely, which means you get no credit for the improvement. Lenders are often reluctant to finance a property with unresolved permit issues, because unpermitted work creates uncertainty about whether the structure is safe and code-compliant. A buyer’s lender flagging your shed can delay or kill a deal.

Retroactive permitting is possible in many jurisdictions, but it usually means opening walls for inspection, bringing the structure up to current code, and paying permit fees plus penalty surcharges. Confirming the setback, fire-separation, and easement rules before you pour a foundation or roll a prefab unit into place is almost always cheaper.