The setup you desire for the multiplayer part requires an online database which stores:
-A Players' Galaxy coordinates with system coordinates (unique references)
-Player game state (gets updated when someone attacked, and is loaded when the player returns)
This to support the online mode when the player is offline; so other online players can find it.
Also, depending on the type of game play you want, if you want real time interaction with other players, you will require the scirra multiplayer plugin (or others) which generally pertain a vastly different approach to game mechanics then regular single player mode.
Tips:
Make a couple smaller multiplayer games mechanics to get a grasp of the differences it will entail.
As for database, I would recommend PHP/MySql by means of Ajax.