To the charge controller. I used a piece of dryer cord to go from controller to batteries. Battery cable ends at parts store. Tight fit to get wires in controller. I have a renogy 30 amp controller. Mount controller to a board and clap wires down to board. Works great.