On Earth, we pray facing Jerusalem. On another planet, it makes sense to pray facing Earth. However, since planets move relative to each other, Earth might not be always in the same direction. In particular, the direction of the Earth might be "above" or "below".
How then can a synagogue be constructed on another planet? Should it perhaps face the nearest spaceport, since that's where one would go to reach Earth?
(I should say this question is not quite hypothetical. I am a sci-fi writer. I would very much like to get the halachic side of the story right. I am also aware of this answer regarding whether the Torah is OK with us leaving Earth at all. I think it is safe to say Hilonim would be leaving Earth regardless, and they would want a synagogue.)