Precision time references in space are of major importance to satellite-based fundamental science, global satellite navigation, earth observation, and satellite formation flying. Here we report on the operation of a compact, rugged, and automated optical frequency comb setup on a sounding rocket in space under microgravity. The experiment compared two clocks, one based on the optical D-2 transition in Rb, and another on hyperfine splitting in Cs. This represents the first frequency comb based optical clock operation in space, which is an important milestone for future satellite-based precision metrology. Based on the approach demonstrated here, future space-based precision metrology can be improved by orders of magnitude when referencing to state-of-the-art optical clock transitions. (C) 2016 Optical Society of America