There was no bathroom on the Apollo missions.

Instead, NASA astronauts peed into a roll-on cuff, and pooped in bags that they kneaded, rolled up tight, and took back to Earth.

NASA's first real space bathroom wasn't installed until the Skylab space station launched in the early 1970s. The first toilet on a US spacecraft didn't show up until the shuttle missions of the 1980s.

NASA engineers said that figuring out how astronauts should relieve themselves is one of the most " bothersome aspects of space travel."

Visit Business Insider's homepage for more stories.

Bathroom breaks on the moon? Forget about it.

Astronauts Neil Armstrong and Buzz Aldrin may have been the first people to set foot on the lunar surface when Apollo 11 landed there 50 years ago, on July 20, 1969, but they had to forgo some Earthly conveniences in order to pull off the moon landing.

NASA engineers were so busy figuring out how to get astronauts to and from the moon that they didn't bother to design a toilet for the Apollo missions of the 1960s and 70s. In fact, the first toilet wouldn't be installed on a US spaceship until the space shuttle got one in the 1980s. (There was technically a toilet on the Skylab space station in the 1970s, but it was an inglorious commode that looked like a hole in the wall, and astronauts had to dry their feces in a special compartment.)

"Defecation and urination have been bothersome aspects of space travel from the beginning of manned space flight," an official NASA report on the Apollo space missions reads.

During Apollo 11, as with all the other Apollo missions, astronauts had to wrestle with a stinking baggie in order to relieve themselves. Here's what the process entailed.

Human waste in space was relegated to a baggie system

To pee, astronauts used what looked essentially like a condom (which they replaced daily), which was hooked up to a bag with a short hose. There was no female-friendly system, since the Apollo astronauts were all men. Spills happened often.

On the Apollo missions, astronauts peed into a cuff that emptied into this bag. The cuff wasn't designed for women. NASA

The procedure for dealing with poop in space was no better.

"In the absence of a system providing positive means for the removal of feces from the body, an extremely basic system had to be relied upon for in-flight fecal collection," the NASA report says. "The device used was a plastic bag which was taped to the buttocks to capture feces."

Read More: From peeing in a 'roll-on cuff' to pooping into a bag: A brief history of how astronauts have gone to the bathroom in space for 57 years

Apollo 11 command module pilot astronaut Michael Collins during a break in training for the July 1969 moon landing journey in Cape Kennedy, Florida, June 19, 1969. Astronauts Neil Armstrong and Edwin (Buzz) Aldrin Jr., took a walk on the lunar surface, while Collins circled alone in moon orbit. AP Photo

This aptly named "fecal bag" that the astronauts used came complete with a compartment for toilet paper, and it had a built-in finger covering so astronauts could stay clean while positioning the bag on their butts. It wasn't easy to get the bag set up correctly inside the small flap at the back of astronauts' space suits. One Apollo astronaut estimated that the whole bathroom-going process took astronauts about 45 minutes.

And even then, the toilet-bag contraption was not fool proof.

During the Apollo 10 mission in May 1969, astronaut Tom Stafford sounded a warning: "Get me a napkin quick. There's a turd floating through the air," he said, according to one NASA transcript.

NASA insisted that the astronauts bring back all of their feces for examination, so after the Apollo astronauts finished doing their business, they had to seal up their baggies and "knead" them, as the report details, mixing in some all-important bactericide that would allow the excrement to get safely back to Earth. (There is now a complete log of all five of the Apollo 11 space turds.)

The poop bags were "rolled into the smallest possible volume" by the astronauts and stored for the return trip, following the well known backpacker mantra "pack it in, pack it out." Unsurprisingly, the report notes that "the problem of odor was continually present" during Apollo bathroom breaks.

"In general, the Apollo waste management system worked satisfactorily from an engineering standpoint. From the point of view of crew acceptance, however, the system must be given poor marks," the final Apollo bathroom report read.

Because relieving oneself in space was such a gross, time-consuming, and smelly task, astronauts often took laxatives before they launched, and sometimes relied on drugs that kept their intestines running more slowly.

On the moon, astronauts wore space diapers

Astronauts couldn't use this same bag system to catch their waste while wearing space suits on the lunar surface. So when Apollo astronauts left their spacecraft, they wore a "fecal containment system," which was basically a diaper.

It's not clear whether Aldrin and Armstrong ever took full advantage of those "systems" in their 21 hours and 36 minutes on the moon, but Buzz does claim to be the first man to ever pee on another celestial body.

"It's lonely as hell out there," he told a crowd at the Newseum on the 40th anniversary of the moon landing. " I peed in my pants."

The plaque that Aldrin and Armstrong left on the moon 50 years ago reads, in part, "here men from the planet Earth first set foot upon the Moon July 1969"

The plaque does not mention that they were both wearing diapers when they took that giant leap.