Nucleic acid-based diagnostic techniques such as polymerase chain reaction (PCR) are used extensively in medical diagnostics due to their high sensitivity, specificity and quantification capability. In settings with limited infrastructure and unreliable electricity, however, access to such devices is often limited due to the highly specialized and energy-intensive nature of the thermal cycling process required for nucleic acid amplification. Here we integrate solar heating with microfluidics to eliminate thermal cycling power requirements as well as create a simple device infrastructure for PCR. Tests are completed in less than 30 min, and power consumption is reduced to 80 mW, enabling a standard 5.5 Wh iPhone battery to provide 70 h of power to this system. Additionally, we demonstrate a complete sample-to-answer diagnostic strategy by analyzing human skin biopsies infected with Kaposi's Sarcoma herpesvirus (KSHV/HHV-8) through the combination of solar thermal PCR, HotSHOT DNA extraction and smartphone-based fluorescence detection. We believe that exploiting the ubiquity of solar thermal energy as demonstrated here could facilitate broad availability of nucleic acid-based diagnostics in resource-limited areas.