Possible to have a dynamic skybox?

I seem to remember this was once a thing, but I can’t find any relevant details any more. Maybe I imagined it.

Is it possible to set up a skybox that gets its image from a space somewhere in my game? Let me describe an example:

Somewhere hidden I have a box or something, say deep under the terrain or somewhere outside of player view, where I set up some rotating & orbiting spheres representing planets or moons.
I would like to have a camera/viewpoint in the middle and have its view of the spheres represented in my skybox.

The planets/moons will be moving, so it’d need to be a dynamic image on the skybox

Justification: I would like to generate terrain as I move around an imaginary planet, but would like to avoid having an actual sphere to move around on. Instead, as I move further away from one position, I rotate the viewpoint in my skybox box (or maybe rotate the box) and so simulate moons & planets appearing lower/higher in the sky.