In the fictional universe of Star Trek, Starfleet Academy is where recruits to Starfleet's officer corps are trained. It was created in the year 2161, when the United Federation of Planets was founded. The Academy's motto is "Ex astris, scientia" – "From the stars, knowledge." This is derived from the Apollo 13 motto "Ex luna, scientia" – "From the moon, knowledge." In turn, the Apollo 13 motto was inspired by "Ex scientia, tridens," the motto of the United States Naval Academy, meaning "From knowledge, seapower."
The main campus of the Academy is located on or near Starfleet headquarters on Earth, in and around what is now Fort Baker, California, across the Golden Gate from San Francisco in what is now Marin County. There are also other campuses; for example, Tom Paris studied at a campus in Marseille, France.
Starfleet Medical Academy is responsible for training Starfleet Medical personnel. It accepts only 200 students each year. It is one of several sub-campuses in the Academy system.
The Star Trek: The Next Generation episode "Coming of Age" revolved around Wesley Crusher's first attempt to enter Starfleet Academy, and includes many details of the Academy's entrance exam. Students undergo a four-year program of academics and training, after which they are typically commissioned as ensigns.
Non-Federation citizens must present a letter of recommendation from a command-level officer in Starfleet before they can take the entrance examination. Commander Benjamin Sisko wrote such a letter for Nog in 2371 when he applied for Starfleet in the Star Trek: Deep Space Nine episode "Heart of Stone". (Nog's time at the Academy is seen in the Starfleet Academy comic book series, where he is a main character.)
Various professors, courses, and "required reading" are often mentioned by officers in various episodes of different series. This is often done in the context of reminiscing or testing the knowledge of a suspected impostor.
One of the groundskeepers of the Academy is a man called Boothby, a character played by Ray Walston who is first featured in the Star Trek: The Next Generation episode "The First Duty". Boothby has offered advice to, and taken interest in the careers of many students, including Jean-Luc Picard and Kathryn Janeway, both later captains.
The Japanese Garden, located on the grounds of the Tillman Water Reclamation Plant in Van Nuys, California, designed by California architect Anthony J. Lumsden, 333 miles (536 km) south, was used to film the main academy's campus near San Francisco; images of the Golden Gate Bridge were superimposed to make the scene appear as if it were indeed on San Francisco Bay.
In the prequel series Star Trek: Enterprise, the "Academy" is mentioned by Commander Tucker in the pilot "Broken Bow" (which takes place in 2151), but it is not established whether this refers to Starfleet Academy or some other service academy. (Another episode of the series made it clear that West Point is still in operation, so Tucker going to another "academy" is certainly possible.) If Tucker was referring to Starfleet Academy, then its founding must have been well before 2151; consequently this would be a retcon unless the academy of the UFP was preceded by an earth-wide academy of the same name. Given Reed's history with the still extant British Royal Navy (still mainly a maritime service), however, one assumes that Dartmouth and comparable officer training institutions were as yet separate entities.
A television series based on Starfleet Academy was proposed but never produced. An early draft of the script to Star Trek VI: The Undiscovered Country featured a flashback to Captain Kirk's time at the academy. According to producer Harve Bennett, that version of the sixth film got as far as preliminary casting, allegedly with offers made to Ethan Hawke for the role of Captain Kirk and John Cusack as Spock.