Where to Install a Home Battery: Garage, Outdoors or Basement?
Most home batteries go in a garage or on an outside wall. Here is what building codes allow, what to avoid, and how location affects performance.
For most homes, the best place to install a home battery is a garage or an outside wall, because building codes allow both and they keep the battery out of living space. Where to install a home battery also depends on your local code, the model's temperature and weather ratings, and how close the spot is to your electrical panel. Model codes do not list bedrooms or other living spaces as standard locations.
Key takeaways
- Allowed locations under the 2021 International Residential Code include garages, exterior walls, outdoors and qualifying utility or storage spaces.
- Code limits total storage by location: 40 kWh in utility spaces and 80 kWh in garages and outdoors, per a UL summary.
- Keep batteries 3 feet from doors and windows that open into the home when mounted on an outside wall.
- Avoid flood-prone spots, direct sun, heating equipment and places where a car could hit the unit.
Where to install a home battery: the common options
Under Section R328.4 of the 2021 International Residential Code, as summarized by IAEI Magazine, these locations are allowed:
- Detached garages and accessory structures.
- Attached garages, separated from the living space with gypsum wallboard that meets the code.
- Exterior walls, with the battery at least 3 feet from doors or windows that open directly into the home.
- Enclosed utility closets, basements, and storage or utility spaces, if they meet wall and ceiling covering rules and do not open directly into a bedroom.
Living spaces are not on that list. IAEI Magazine notes that the earlier 2018 code said storage systems "shall not be installed within the habitable space of a dwelling," and that under current rules a unit can go in a habitable space only if it has passed UL 9540A cell-level criteria and is marked as suitable for residential habitable spaces. In practice, plan on a garage, outside wall or qualifying utility space rather than a hallway, living room or bedroom.
How much battery storage code allows in each location
Codes also cap how much storage you can put in each spot. A UL summary of the 2021 residential requirements lists the following. Your state or city may use a different edition or add its own rules.
| Location | Total storage allowed (2021 residential code summary) | Notes |
|---|---|---|
| Utility closets, basements, storage or utility spaces | 40 kWh | Must be uninhabitable space |
| Attached or detached garages | 80 kWh | Separated from living space |
| Exterior walls and outdoors on the ground | 80 kWh | 3 ft from doors and windows into the home |
| Any location, per unit | 20 kWh per unit | Units spaced 3 ft apart unless UL 9540A data allows less |
For a sense of scale, a Tesla Powerwall 3 is 13.5 kWh and a FranklinWH aPower 2 is 15 kWh, according to their data sheets. Two of either would fit within an 80 kWh garage limit. Some areas are more generous: San Francisco's fire department lists up to 100 kWh on or within 3 feet of exterior walls and up to 200 kWh outdoors on the ground with 3 feet of clearance from property lines and dwellings.
Installing a home battery in a garage
Garages are popular because they are usually near the main panel and protected from weather. Things to plan for:
- Vehicle impact: EnergySage advises a barrier if a car could hit the battery. EPRI suggests mounting the bottom above hood height or adding barriers.
- Fire separation: an attached garage must be separated from the living space with gypsum board meeting the code, per IAEI Magazine.
- Clutter: EPRI recommends at least 3 feet, or the manufacturer's clearance, free of flammable items. That means no paint cans, gas cans or lawn equipment stacked against the unit.
- Temperature: PNNL notes garages can get much hotter or colder than the rest of the house. Check the model's operating range.
- Heat alarms: some jurisdictions require them. San Francisco, for example, requires heat alarms above the battery in many cases.
EPRI's guide says a detached garage is preferred over an attached one when the battery goes indoors.
Installing a battery outdoors or on an exterior wall
Many current batteries are rated for outdoor use. The Powerwall 3 is "indoor and outdoor rated" with a NEMA 3R enclosure, and the Enphase IQ Battery 5P has an outdoor NEMA 3R enclosure, according to their data sheets. EPRI actually lists outdoors, on non-flammable material such as masonry, metal or gypsum, as the preferred location.
Outdoor tips from EPRI and EnergySage:
- Keep at least 3 feet from doors and windows into the home (code and EnergySage).
- Mount above the typical maximum snow level, and away from areas that flood or get leaks from above (EPRI).
- Avoid hot south-facing walls in hot climates and direct sunlight; Enphase's sheet specifically says to avoid direct sun.
- On wood-sided homes, EnergySage says a non-combustible barrier may be needed between the battery and the wall.
- Avoid spots where children, pets or wildlife could interfere with it, and trim nearby vegetation (EPRI).
Installing a home battery in a basement or utility room
Basements and utility rooms can work, but they are not automatically approved. IAEI Magazine stresses that a basement must still meet the code's wall and ceiling covering rules and must not open directly into a bedroom. EnergySage notes that an indoor unfinished room needs at least 5/8-inch gypsum board on walls and ceiling. These spaces also have a lower limit of 40 kWh total.
Temperature limits by model
Temperature matters wherever the battery goes. Manufacturer ranges include:
- Tesla Powerwall 3: -4°F to 122°F, with possible derating above 104°F.
- Enphase IQ Battery 5P: -4°F to 131°F when discharging, with an optimum range of 32°F to 86°F; Enphase advises a well-ventilated, non-habitable indoor spot such as a garage, or an outdoor location.
- FranklinWH aPower 2: -4°F to 122°F, operating up to 131°F at reduced output.
A 2017 study by NREL (now the National Laboratory of the Rockies) modeling a grid-connected lithium-ion storage system found that cycle life drops significantly at both high and low temperature extremes. Picking a cooler, shaded spot can help a battery last longer. See how long do home batteries last for more.
How location affects cost, backup and warranty
Location can change the price. A spot far from the main panel may need longer wire runs, and a spot that needs new fire-rated drywall, barriers or heat alarms adds work. EnergySage also notes that a structural engineer may need to confirm a wall can carry the weight; the Powerwall 3 weighs 287 pounds and the aPower 2 weighs 357 pounds, according to their data sheets.
The battery itself is the biggest cost. EnergySage marketplace data from the first half of 2026 put a typical 13.5 kWh battery at about $15,647 before incentives.
A note on tax credits: the federal residential clean energy credit (Section 25D) does not apply to expenditures made after December 31, 2025. For this credit, an expenditure counts as made when installation is complete, so a battery finished in 2026 generally does not qualify. State and utility programs may still exist, so check what applies where you live.
Location can also affect your warranty. Tesla's warranty excludes damage from installation not following Tesla specifications and from unauthorized relocation, so do not move a battery yourself later. Whether you want the battery mainly for backup or to save on time-of-use electricity rates, the right spot is one that keeps it within its temperature range and easy to service. For the bigger value question, read are solar batteries worth it.
Next steps
Walk your property with the installer and ask them to show where the battery, any gateway or switch, and the wire runs will go, and which code edition your area uses. Get the location in writing on the quote. Compare installers in our solar company reviews, and read our guide to home battery safety for day-to-day safety habits.
Frequently asked questions
Can I put a home battery in my basement?
Sometimes. The 2021 International Residential Code allows basements and utility spaces if they meet wall and ceiling covering rules and do not open into a bedroom, with a 40 kWh total limit.
Is it better to install a battery inside or outside?
EPRI lists outdoors on non-flammable material as the preferred spot, with a detached garage preferred over an attached one indoors. The right choice also depends on your climate and the model's rating.
How far does a battery need to be from windows and doors?
Under the 2021 International Residential Code, as summarized by IAEI Magazine, a battery on an exterior wall must be at least 3 feet from doors or windows that open directly into the home. Local codes can add more rules.
Can a home battery be installed in direct sunlight?
It is best avoided. Enphase's IQ Battery 5P data sheet says to avoid direct sunlight, and EPRI advises against hot spots like south-facing walls in hot climates.
Does my battery need to be near the electrical panel?
It is not a code requirement, but a spot close to the main panel usually means shorter wire runs and a simpler installation. Ask your installer how the location affects the price.
Sources
- IAEI Magazine – Energy storage systems installed at dwellings
- UL Code Authorities – ESS separation and maximum quantities, 2021 residential requirements
- San Francisco Fire Department – Energy Storage Systems in R-3 Occupancies
- EPRI – Residential Energy Storage System Safety Guidelines
- EnergySage – Where to install solar batteries in your home (updated Sept 2025)
- PNNL – Battery safety factsheet (March 2026)
- Tesla – Powerwall 3 Datasheet (North America)
- Enphase – IQ Battery 5P data sheet (US, 2023; hosted by Signature Solar)
- FranklinWH – aPower 2 datasheet
- NREL (now NLR) – Life Prediction Model for Grid-Connected Li-ion Battery Energy Storage System (2017)
- Tesla – Powerwall Limited Warranty (USA)
- EnergySage – Solar battery cost data (updated July 2026)
- Congressional Research Service – Expiration and carryforward rules for the Residential Clean Energy Credit (Sept 2025)
Questions and comments
Be the first to ask a question or share your experience.