Most of the AI battlegroups go after your homeworlds, rather than the hubs. Also, since the hubs themselves are practically invincible, I find the best strategy is to use the hubs to defend your homeworld, especially if you can find decent chokepoints to place them at. Research Mark III force fields ASAP, then focus on laser and heavy beam cannon tech. I'm at the point now where I have three hubs (all sitting directly over wormholes) and any one of them can easily handle one of the battlegroups the AI is sending, without any outside support.
Orbital Mass Drivers are also a godsend. If I know I am going the Fallen Spire route, the first time the Trader comes through I will find the resource node closest to my home command and put two OMDs there under a force field, which I'll slowly build as my economy allows. Once I get the refugee outpost, I put it by that resource node for additional firepower, and then build about ten of each turret there (deleting the forcefield once everything is in place, of course). Combined with the usual wormhole defenses, that will tend to deal with anything that gets through your outer systems.
Definitely the most important thing is to put the hub in a position where it's silly amount of firepower will be useful to you; my first Fallen Spire game I made the mistake of putting it on the edge of one of my systems (thinking to keep it safe) and it ended up with all this firepower it never got to use. Now I never consider putting a hub anywhere except directly on top of a wormhole (or maybe on top of a command station or Adv Factory if it's a planet I really can't afford to lose).