Ditto, elzappr.
Once you leave your service main, it becomes a feeder and you can run as far as you like with it. Without an external main, I would check with local AHJ for anything that exceeds 3 ft.