Installing your own solar panels is legal throughout the United States, but “legal” and “simple” are not the same thing. These codes, which encompass structural, electrical, fire safety, and zoning regulations, provide a comprehensive framework for the proper design, installation, and. However, it's crucial to understand that while installing solar panels is legal, certain conditions must be met. Do. Solar, or photovoltaic (PV) panels as they're referred to in NFPA 1, Fire Code, are becoming more and more common on one- and two-family dwelling and townhouse roofs. Since the 2016 edition of NFPA 1, access pathways have been required on roofs to facilitate fire service access as well as egress.