v3.10.0.1

Fair Value Measurement - Schedule of Carrying Values and Fair Values of Debt Instruments (Details) - USD ($) $ in Thousands | Jun. 30, 2018 | Dec. 31, 2017
--- | --- | ---
Carrying Value |  |
Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |  |
Debt instrument, fair value | $ 1,497,609 | $ 1,294,945
Fair Value |  |
Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |  |
Debt instrument, fair value | 1,491,268 | 1,294,973
Bank line of credit | Carrying Value |  |
Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |  |
Debt instrument, fair value | 247,000 | 247,000
Bank line of credit | Fair Value |  |
Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |  |
Debt instrument, fair value | 247,000 | 247,000
Senior debt | Carrying Value |  |
Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |  |
Debt instrument, fair value | 1,003,688 | 808,455
Senior debt | Fair Value |  |
Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |  |
Debt instrument, fair value | 1,003,328 | 807,698
Subordinated debt | Carrying Value |  |
Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |  |
Debt instrument, fair value | 153,674 | 111,488
Subordinated debt | Fair Value |  |
Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |  |
Debt instrument, fair value | 152,214 | 111,095
Securitization debt | Carrying Value |  |
Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |  |
Debt instrument, fair value | 93,247 | 95,821
Securitization debt | Fair Value |  |
Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |  |
Debt instrument, fair value | 88,726 | 96,999
SREC Loans | Carrying Value |  |
Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |  |
Debt instrument, fair value | 0 | 32,181
SREC Loans | Fair Value |  |
Fair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items] |  |
Debt instrument, fair value | $ 0 | $ 32,181

X
- Definition Line items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table. + References No definition available. + Details
Name: | us-gaap_FairValueBalanceSheetGroupingFinancialStatementCaptionsLineItems
Namespace Prefix: | us-gaap_
Data Type: | xbrli:stringItemType
Balance Type: | na
Period Type: | duration

X
- Definition The fair value amount of long-term debt whether such amount is presented as a separate caption or as a parenthetical disclosure. Additionally, this element may be used in connection with the fair value disclosures required in the footnote disclosures to the financial statements. The element may be used in both the balance sheet and disclosure in the same submission. + References No definition available. + Details
Name: | us-gaap_LongTermDebtFairValue
Namespace Prefix: | us-gaap_
Data Type: | xbrli:monetaryItemType
Balance Type: | credit
Period Type: | instant

X
- Details
Name: | us-gaap_FairValueByMeasurementBasisAxis=us-gaap_CarryingReportedAmountFairValueDisclosureMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_FairValueByMeasurementBasisAxis=us-gaap_EstimateOfFairValueFairValueDisclosureMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DebtInstrumentAxis=run_BankLineOfCreditMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DebtInstrumentAxis=run_SeniorDebtMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DebtInstrumentAxis=us-gaap_SubordinatedDebtMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DebtInstrumentAxis=run_SecuritizationDebtMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |

X
- Details
Name: | us-gaap_DebtInstrumentAxis=run_SRECLoansMember
Namespace Prefix: |
Data Type: | na
Balance Type: |
Period Type: |