How to install solar panels
This guide shows how to install solar panels yourself, on a roof, on a ground mount, or on an RV or shed. Can you do it yourself? For off-grid and small systems, yes. You can plan the layout, mount the racking and panels, wire the array and connect the rest of the system with ordinary tools and care. A grid-tied system is different. Connecting to your home’s electrical panel and the utility grid usually needs a permit, an inspection, utility approval and a licensed electrician for the final connection.
The steps below follow the order of the job: preparation first, then planning the layout, choosing and installing the mounts, mounting the panels, wiring, connecting the system, and the inspection. Safety notes come at the steps where they apply. Electrical and building codes vary by location, so check your local requirements before you start.
Before you start
A little preparation saves most of the problems that come up later:
- Permits and rules. Ask your local building department whether your project needs a permit. Most roof-mounted systems on homes do, many ground mounts do, and some areas require one even for off-grid systems. If you have a homeowners association, check its rules too. Most permits need a simple site plan and the equipment datasheets.
- Roof condition. Panels last for decades, so if your roof is near the end of its life, replace it first. Taking panels down and putting them back up for a reroof adds cost later. Check for soft spots, damaged shingles and leaks.
- Shade. Check the site for shade from trees, chimneys and nearby buildings across the day and through the seasons. Winter shadows are much longer than summer ones. Even partial shade on a panel cuts its output.
- Your system design. Know how many panels you’re installing, how you’ll wire them and where the charge controller, batteries and inverter will go before you buy mounting hardware. Our guide to planning and building a DIY solar system covers the design steps.
- Tools. A drill and driver, a stud finder or a way into the attic, a chalk line, a tape measure, a torque wrench, a multimeter, MC4 connector tools, and the sealant your racking manufacturer specifies.
- Safety gear. For roof work, use fall protection: a harness attached to a properly installed roof anchor. Wear non-slip shoes, gloves and eye protection. Plan to work with a helper, since panels are bulky and catch the wind like a sail.
Step 1: Plan the layout
Mark out exactly where each panel will go before you drill any holes:
- Count the panels. Our guide to how many solar panels you need works out the count from your energy use. Check the panel dimensions on the datasheet.
- Leave the required setbacks. Many fire codes require clear pathways on residential roofs, typically along the ridge and edges, so firefighters can get onto the roof. The distances vary by jurisdiction and roof layout, so get them from your building department.
- Find the rafters. Roof mounts must fix into the rafters (or trusses), not just the roof deck. Find them from the attic, with a stud finder, or by measuring from a known rafter. Then mark the centerlines on the roof with a chalk line.
- Face and tilt. In the Northern Hemisphere, face the panels south if you can. East- and west-facing panels still work, with somewhat less output. On a pitched roof, the roof sets the tilt. On a ground mount or flat roof, a tilt close to your latitude works well year-round.
- Check the racking span. The racking manual lists the maximum distance between mounts for your wind and snow loads. Use it to decide how many mounts each rail needs.
Step 2: Choose a mounting system
The mounting system decides how the panels attach to your roof or the ground, and it’s where solar panel mounting brackets come in:
| Mount type | How it attaches | Best for | Things to watch |
|---|---|---|---|
| Roof rails with flashed mounts | Aluminum rails on L-feet or brackets, lagged into rafters through flashing | Most pitched shingle roofs | Every roof penetration must be flashed and sealed |
| Rail-less roof mounts | Each panel clamps directly to individual flashed mounts | Pitched roofs, with fewer parts to lift | Panel layout must line up with rafters |
| Ground mounts | Steel or aluminum frame on concrete footings or ground screws | Open land, no roof work, easy cleaning | Needs space, and a buried cable run to the house |
| Pole mounts | One or more panels on a single post, often adjustable | Small arrays, deep snow areas | Wind loads on the post and footing |
| RV, shed and flat-roof brackets | Z-brackets, tilt brackets or ballasted frames | Vans, RVs, sheds, flat roofs | Sealing on RVs; weight and drainage on flat roofs |
Buy racking from one manufacturer as a complete system, including its rails, clamps, flashing and grounding parts. Mixing brands can void the product’s certification and make the system harder to get through inspection.
Step 3: Install the racking
The racking holds the array through decades of wind and snow, so take your time:
- Set your fall protection first. Install the roof anchor according to its instructions and clip in before working near an edge. Extend the ladder about 3 feet (1 m) above the roof edge, secure it, and keep three points of contact while climbing. Don’t work on a wet, icy or windy roof.
- Drill into the rafter centerlines. Drill pilot holes at the marks, checking that you hit solid wood. A hole that misses the rafter has to be sealed and moved.
- Flash every penetration. Slide each flashing under the shingle course above, as the racking manual shows, so water runs over it. Use the specified sealant in the pilot hole and under the mount.
- Fix the mounts. Drive the lag bolts or structural screws to the depth the manual specifies, without over-tightening and crushing the roof deck.
- Attach and level the rails. Bolt the rails to the mounts, line them up with a string line, and adjust them to sit level and parallel. Use the manufacturer’s splices to join rail sections.
- Torque everything to spec. Tighten each bolt to the torque in the manual, using a torque wrench.
For a ground mount, set the footings or ground screws to the depth and spacing in the manual. Let concrete cure fully before you load the frame.
Step 4: Mount the panels
- Plan the lift. Panels are awkward and fragile. On a roof, have a helper hand them up, or use a ladder lift. Never carry a panel up a ladder alone.
- Set the first panel with end clamps. Place it on the rails, inside the clamping zones marked in the panel’s manual, and fix the outer edge with end clamps.
- Add the next panels with mid clamps. Each mid clamp holds the edges of two neighboring panels. Keep the gaps even and the rows straight.
- Torque the clamps to the racking manufacturer’s spec. Loose clamps can let panels shift or lift in high wind, and overtightened clamps can crack the glass.
- Bond and ground the array. The panel frames and rails must be bonded together and connected to ground. Many racking systems do this with bonding clamps or washers that bite through the anodized coating, plus a grounding lug on each rail. Follow the racking manual, since this is part of what the inspector checks.
Keep the panels covered, or their leads unplugged, while you work. Panels produce voltage whenever light hits them.
Step 5: Wire the array
Connect the panels into strings according to your design:
- Plug the panels together in series, in parallel or in series-parallel, using the panels’ MC4 leads and branch connectors where needed.
- Run outdoor-rated solar cable from the array to the charge controller, through a DC disconnect. Support cables off the roof surface with clips on the rails, and run them through a weatherproof entry into the building.
- Check each string’s voltage and polarity with a multimeter before connecting anything.
Our guide to wiring solar panels in series vs parallel covers each layout, and how to check its voltage against your charge controller on the coldest day of the year.
Step 6: Connect to the controller, batteries and inverter
With the array wired and its disconnect switched off, connect the rest of the system in this order:
- Mount the equipment. Fix the charge controller, inverter and disconnects to a wall or board near the batteries, in a dry, ventilated space, with the clearances their manuals require.
- Connect the charge controller to the batteries first. Fit a fuse or breaker on the positive cable close to the battery, then connect the controller and check that it recognizes the battery voltage. Our solar charge controller guide explains the settings to enter for your battery type.
- Connect the panels to the charge controller. Run the array cable to the controller’s PV input, check polarity, then close the DC disconnect.
- Connect the inverter to the batteries. Use the cable size and fuse the inverter manual specifies, and keep the cables short. Our guide to sizing an off-grid inverter covers fusing and grounding the inverter.
- Test before you load it. Switch on the inverter, check its output, then add loads one at a time.
To disconnect for maintenance, work in reverse: open the panel disconnect first and disconnect the battery last.
Step 7: Inspection and turning it on
If your project needed a permit, book the inspection before you switch the system on for regular use. Inspectors typically check the roof attachments and flashing, the grounding and bonding, wire sizes, fusing, disconnects and labels. Leave everything accessible, and keep the manuals and datasheets on hand.
For a grid-tied system, passing inspection isn’t the last step. The utility must also approve the interconnection and give you permission to operate before you turn the system on. Switching on before then can break your agreement with the utility, and a system feeding the grid without approval is a hazard to line workers.
After you switch on, check the charge controller or inverter readings over the first few sunny days, to confirm the array produces about what you expected.
When to hire a pro
A DIY install is realistic for many people, but some parts of the job are better left to a professional:
- Connecting a grid-tied system to your electrical panel. This is electrical work in your home’s main panel, and most utilities and building departments require a licensed electrician for it.
- Steep, high or fragile roofs. Steep pitches, roofs more than one story up, and tile, slate or metal roofs that need special mounts are safer for a crew with the right equipment.
- Structural questions. If you’re unsure whether the rafters can carry the extra load, especially in heavy-snow areas, have a structural engineer or roofer check them.
- Where your permit requires it. Some jurisdictions only issue solar permits to licensed contractors.
- Anything you’re not confident about. Paying an electrician to review your design before you buy parts, or to check your wiring before you switch on, costs far less than fixing a fault later.
If your installation will be your only source of power, our guide to sizing an off-grid solar system explains how to plan for winter and long cloudy spells.
Frequently asked questions
Can I install solar panels myself?
Yes, for most off-grid systems and for small systems on sheds, cabins and RVs. You’ll need basic tools, careful planning, and fall protection for roof work. For grid-tied home systems, you can usually do the mounting and much of the wiring, but the connection to your electrical panel and the grid normally needs a permit, an inspection, utility approval and a licensed electrician.
How long does it take to install solar panels?
A small off-grid system on a shed or RV often takes a weekend. A DIY roof installation on a home usually takes several days of work, spread over more time for permits, the inspection and, for a grid-tied system, utility approval, which can take weeks.
Do I need a permit to install solar panels?
Usually, for any system on a home’s roof or connected to its wiring, and often for ground mounts too. Requirements for small off-grid systems vary more. Check with your local building department before you buy parts.
Can I put solar panels on a shed or RV?
Yes. Sheds and RVs are some of the easiest places to start. On a shed, check that the roof structure can carry the panels and racking. On an RV, use brackets designed for vehicles, and seal every screw hole with a sealant suited to the roof material.