Priorities

We’re coming into a bit of money. I want to pay off the mortgage, my husband wants to put in solar panels to get off the grid. Anyone have any advice as to what we should prioritize?