Long space flights and planetary settlement will require sources of nutrition and chemicals that must be generated in space. This will include not only amino acids and vitamins but also oxygen, all of which can be generated by means of biosynthesis. Synthetic biology has the potential to generate organisms designed for supplying human nutritional needs in space. Photosynthetic microbes may be ideal for this purpose, as they are more efficient per volume cultivated than green plants at conversion of light to chemical energy, biomass and nutritional molecules. In addition, microbes are easier and faster to genetically engineer, facilitating not only design and terrestrial manufacture of organisms optimized for growth and nutrient production in the artificial conditions of space, but superior ability in space to develop organisms suited to newly discovered environments. The rapid ability to adapt and create new microbes to suit new circumstances when in space offers significant potential for risk reduction. Development of sun-driven microbial production of nutritional chemicals would also have terrestrial benefits in commerce and sustainability. A synthetic biology approach to chemical production would not be based on fossil fuels as such fuels do not exist on other planets. This approach would highlight a synergistic relationship between outer space and ‘spaceship earth’, illustrating NASA's role in stimulating technology development with terrestrial application. Two specific approaches deserve consideration: production by traditional photosynthetic microbes, or by the newly appreciated capacity of some bacteria to absorb electric current (e.g. solar panels) to drive metabolism. Palatability and sensory stimulation are a key part of food consumption and could be engineered into microbes. As a first step, NASA should test a bioreactor in which genetically engineered, nutrient-producing photosynthetic bacteria are grown and harvested in space.