Problem 1: Finding the base.
Problem 2: Make sure the railgun is powerful enough to go through all the asteroids on the way...
Well, that is of course if we play rule of cool like in those movies where asteroids are ridiculously close to each other.
If we don't play rule of cool, well, I'm sorry to say we literally have no chance against the empire because you know, irl, stealth in space isn't a thing.http://www.projectrho.com/public_html/rocket/spacewardetect.php
Wargames like GDW's STAR CRUISER describe interplanetary combat as being like hide and go seek with bazookas. Stealthy ships are tiny needles hidden in the huge haystack of deep space. The first ship that detects its opponent wins by vaporizing said opponent with a nuclear warhead. Turning on active sensors is tantamount to suicide. It is like one of the bazooka-packing seekers clicking on a flashlight: all your enemies instantly see and shoot you before you get a good look. You'd best have all your sensors and weapons far from your ship on expendable remote drones.
Well, that turns out not to be the case.
The "bazooka" part is accurate, but not the "hiding" part. If the spacecraft are torchships, their thrust power is several terawatts. This means the exhaust is so intense that it could be detected from Alpha Centauri. By a passive sensor.
The Space Shuttle's much weaker main engines could be detected past the orbit of Pluto. The Space Shuttle's manoeuvering thrusters could be seen as far as the asteroid belt. And even a puny ship using ion drive to thrust at a measly 1/1000 of a g could be spotted at one astronomical unit.