No. Don’t put a home solar battery in the attic. The residential code’s list of allowed battery locations leaves attics out. Summer attic air can run past the charge limit of an indoor lithium iron phosphate (LFP) battery such as EG4’s. Attic framing isn’t designed to carry a load of more than 300 lb on a footprint smaller than a doormat. The battery goes in a garage, in a utility room or basement that meets the wall rules, or on an exterior wall at least 3 ft from doors and windows.
Does the building code allow a solar battery in the attic?
The residential code names the places a home battery may go, and the attic isn’t one of them. California Residential Code Section R327.4 uses the same wording as IRC R328.4. Here it is as reprinted in the Town of Woodside’s energy storage handout:
> “ESS shall be installed only in the following locations: 1. Detached garages and detached accessory structures. 2. Attached garages separated from the dwelling unit living space in accordance with Section R302.6. 3. Outdoors or on the exterior side of exterior walls located not less than 3 feet (914 mm) from doors and windows directly entering the dwelling unit. 4. Enclosed utility closets, basements, storage or utility spaces within dwelling units with finished or noncombustible walls and ceilings.”
ESS means energy storage system. Pay attention to the word “only.” If a location isn’t on the list, it isn’t allowed.
The same code section rules out the inside of the house too: “ESS shall not be installed in sleeping rooms, closets, spaces opening directly into sleeping rooms or in habitable spaces of dwelling units.” According to IAEI Magazine’s summary of the 2021 IRC, the battery must also be listed and labeled to UL 9540 (R328.2). The 2021 edition has an exception: a unit that passed the UL 9540A cell-level test and is marked “Suitable for Use In Residential Habitable Spaces” can go in living space. That exception covers living space only. It doesn’t add attics to the list.
| Location | Conditions | Max aggregate energy (kWh) |
|---|---|---|
| Utility closet, basement, storage or utility space | Finished or noncombustible walls and ceilings; must not open directly into a sleeping room | 40 |
| Attached garage | Separated from the living space per R302.6 | 80 |
| Detached garage or detached accessory structure | On the list with no separation condition | 80 |
| Exterior wall, outside face | At least 3 ft from doors and windows that open directly into the home | 80 |
| Outdoors on the ground | At least 3 ft from doors and windows that open directly into the home | 80 |
| Attic | Not on the list | Not permitted |
A few more rules come with the list. No single unit can be rated above 20 kWh. Units have to sit at least 3 ft apart, unless large-scale fire testing shows a smaller gap is adequate. In utility closets, basements and utility spaces with unfinished wood-framed walls and ceilings, the code asks for “not less than 5/8 inch Type X gypsum wallboard.” In California, a system bigger than these caps falls under Fire Code Sections 1206.1–1206.9.
Your town can add its own rules on top. The Woodside fire district, for example, requires indoor batteries to sit at least 18 inches off the floor. That’s a local rule, not model code. The permit office, called the authority having jurisdiction (AHJ), has the final say on where the battery goes. Ask them before you buy anything.
How hot does an attic get compared with a battery’s temperature limits?
On a hot summer afternoon, an attic can get hot enough to pass an indoor LFP battery’s charge limit. The Florida Solar Energy Center tested homes side by side in Ft. Myers and found that “the attic temperature during the peak summer hour is 40 °F greater than ambient air temperature in the control home” (Parker, Sonne and Sherwin, 2002).
Assume a 95°F afternoon. That’s an assumption, so swap in your own summer high. Add the 40°F rise and the attic air comes to about 135°F. Compare that with the limits on the EG4 WallMount 314Ah Indoor spec sheet:
| Condition | Temperature (°F) |
|---|---|
| Attic air at peak hour on an assumed 95°F day | about 135 |
| EG4 Indoor charge range | 32 to 122 |
| EG4 Indoor discharge range | -4 to 131 |
| EG4 recommended storage, longer than 3 months | 59 to 86 |
At 135°F the attic is 13°F over the charge limit and 4°F over the discharge limit. The battery isn’t rated to run at that temperature in either direction. The storage figure isn’t an operating limit, but it shows where the manufacturer wants the cells kept when they sit for months.
A reflective roof helps, but it doesn’t fix the code problem. In the same Florida study, attic temperature was “no greater than ambient with highly reflective roofing systems,” and the white reflective roofs cut cooling energy use by 18–26%. On a 95°F day, though, “no greater than ambient” still allows an attic as hot as 95°F. That’s up to 9°F above the top of EG4’s long-term storage range, and the attic still isn’t on the code list.
If your attic runs hot, fix the airflow for the roof’s sake. The page on roof ventilation and solar panels covers how.
Can attic joists hold the weight of a home battery?
Not the way most attics are built. Ceiling joists under an attic are designed for little or no storage, spread across the floor, not for a heavy cabinet on a small base. IRC Table R301.5, shown here as Washington State adopted it, sets these minimum live loads:

| Attic type | Minimum live load (psf) | Applies when |
|---|---|---|
| Uninhabitable, no storage | 10 | Clear height between joists and rafters is not more than 42 in |
| Uninhabitable, limited storage | 20 | Clear height between joists and rafters is 42 in or greater |
| Habitable, or served by fixed stairs | 30 | — |
EG4’s product page lists the WallMount 314Ah Indoor at 314 lb and 36.4 x 18.1 x 9.6 in.
- Base, standing upright: 18.1 in x 9.6 in = 173.8 sq in, or 1.21 sq ft
- Load on that base: 314 lb ÷ 1.21 sq ft ≈ 260 psf
- Against the table: about 13 times the 20 psf limited-storage load, and about 26 times the 10 psf no-storage load
The table gives a uniform design load, and the battery is a concentrated one. Treat the comparison as a sense of scale, not an engineering check. The gap is too large to argue about anyway.
Now spread it out. Build a 4 x 4 ft platform (16 sq ft) and the battery alone works out to 314 ÷ 16 ≈ 19.6 psf. That uses nearly the whole 20 psf allowance for an attic with limited storage. It doesn’t count the platform itself, the boxes already up there, or the two people carrying the battery in. In a 10 psf attic, the battery alone is about twice the design load.
Only an engineer who looks at your joist size, span and spacing can tell you what your ceiling actually carries. Most homeowners never need to ask, because the battery goes on a slab or a wall instead. For the roof side of the same question, see how panel weight compares in solar panel weight per square foot. Panels spread their load across many rafters. A battery puts all of its weight in one spot.
What about getting it up there and servicing it?
Per EG4, the indoor unit weighs 314 lb and the All Weather unit 309 lb. Moving either one means a ladder and a narrow hatch. Service techs need to reach the battery to read its display and work on it. Firefighters need to find it and get to it. An attic makes every one of those jobs harder.
Where should a solar battery go instead: garage, utility room or outside wall?
Pick a spot from the code list, then match the battery’s enclosure to it. An indoor IP20 unit belongs in a garage, basement or utility room. On an outside wall, use an outdoor-rated unit (look for IP65 or IP67 on the spec sheet), with a built-in heater if your winters freeze.

| Location | Battery type that fits | Code conditions | Practical notes |
|---|---|---|---|
| Attached garage | Indoor IP20, such as the EG4 WallMount 314Ah Indoor (16 kWh, hybrid wall or floor mount) | Separated from the living space per R302.6 | Slab floor, easy service access; check the summer temperature |
| Detached garage or shed | Indoor IP20 or outdoor-rated | No separation or wallboard condition on the list | Longer wire run back to the house |
| Utility room or basement | Indoor IP20 | Finished or noncombustible walls and ceilings; not habitable space; must not open directly into a bedroom | 40 kWh cap, half the garage limit |
| Exterior wall | Outdoor-rated with a heater, such as the EG4 WallMount 314Ah All Weather (16 kWh, IP67, internal heaters) | At least 3 ft from doors and windows that open into the home | Keeps the battery out of the house entirely |
Which spot fits depends on your climate.
- Hot climate: Use the coolest listed spot you have. A garage can run hot too, so put a thermometer in yours on a July afternoon before you commit. If it gets near the battery’s charge limit, an interior utility room that meets the wall rules is the better choice.
- Mild climate with a shaded wall: A north-facing exterior wall gets the least direct sun in the US. An outdoor-rated unit there stays out of the living space and out of the afternoon sun.
- Cold climate: Use a heated outdoor unit, or an indoor unit in a basement or garage. EG4’s indoor unit is self-heating, so it can handle a cold garage.
If you’re choosing between an indoor wall-mount unit for the garage and a heated outdoor unit for an exterior wall, a 48 volt battery listing that shows each model’s capacity and indoor or outdoor rating side by side lets you check the specs against the spot you have.
Before you settle on a spot, check:
- The location is on the code list in the first table.
- The battery and inverter, as a combination, are listed to UL 9540. EG4’s UL 9540 listing for the indoor unit pairs it with the FlexBOSS21 and FlexBOSS18 inverters.
- If the battery is in a utility closet, basement or utility space, unfinished wood-framed walls and ceilings have 5/8 in Type X gypsum.
- An outdoor unit sits at least 3 ft from any door or window that opens into the home.
- If you’re installing several units, each is 20 kWh or less, they sit 3 ft apart, and the total doesn’t exceed that location’s cap.
- You’ve asked the permit office about local add-ons, such as Woodside’s 18 in floor clearance.
Does the battery change anything about the roof itself?
Not much, as long as the battery stays off the roof and out of the attic. The wiring still has to get from the panels down to the inverter and battery, and that conduit crosses the roof somewhere. Every place it goes through the roof is a place water can get in. Flash each one properly, the way you would a plumbing vent, instead of smearing sealant around it and calling it done. That’s ordinary residential roofing work, and it’s much easier to do well on a new roof than an old one.
If your shingles are already shedding granules into the gutters or curling at the tabs, reroof before the solar and storage go in. Panels have to come off for a reroof, and so do the conduit runs and their flashing. Work through the replace-roof-before-solar checklist first.
FAQ
Can a solar battery be mounted on the roof next to the panels?
That isn’t a standard residential location. R327.4 and R328.4 don’t name the roof as a location. If an installer suggests it, ask the permit office first, and expect the same heat and framing-load questions an attic raises.
Is a basement OK for a home battery?
Yes, if that part of the basement isn’t habitable space. It needs finished or noncombustible walls and ceilings, or 5/8 in Type X gypsum over unfinished wood framing. It must not open directly into a sleeping room. The total for that location is capped at 40 kWh.
How many kWh of batteries can go in a garage?
Up to 80 kWh in total, in an attached or detached garage. No single unit can be rated above 20 kWh, and units sit at least 3 ft apart. With 16 kWh units, that’s five batteries.
Does a battery with a built-in heater make a cold attic OK?
No. The heater solves a winter charging problem. It does nothing about a summer attic around 135°F, it doesn’t put attics on the code list, and it doesn’t take any weight off the joists.
Three questions to ask your installer and roofer
- Which location on the code list are you using, and has the permit office signed off on it?
- Is this battery and inverter combination listed to UL 9540, and what are its charge and discharge temperature limits?
- Where will the conduit cross my roof, and who flashes those penetrations?
Updated: December 2026
