Enderûn (Ottoman Turkish: اندرون, from Persian andarûn, lit. 'inside') was the term used in the Ottoman Empire to designate the "Inner Service" of the imperial court, concerned with the private service of the Ottoman sultans, as opposed to the state-administrative "Outer Service" (Birûn). Its name derives from the location of the sultan's apartments in the inner court of the Topkapi Palace, which in turn echoed the arrangements of the palace in Edirne, the Ottomans' second capital.
The Inner Service was divided into departments (termed oda, 'chamber'). Four were dedicated to the Sultan's personal service. In descending order of importance, these were the Privy Chamber (hass oda), the Treasury (hazine), the Privy Larder (kilar-ı hass), and the Campaign Chamber (seferli oda). The head of the Inner Service—and until the rise of the Kizlar Agha the most powerful person in the palace after the Sultan—was the Kapi Agha or chief white eunuch. After the Kapi Agha came a number of senior officers or aghas: the head of the Privy Chamber (hass oda başı), who on account of his permanent proximity to the Sultan was a very influential individual; the Sultan's stirrup-holder (rikabdar); the keeper of the Sultan's outer garments (çuhadar); the keeper of the Sultan's linen undergarments (dülbend oghlanı); and the Sultan's confidential secretary (sır katibi).