An ostiarius, a Latin word sometimes anglicized as ostiary but often literally translated as porter or doorman, originally was a servant or guard posted at the entrance of a building. See also gatekeeper.
In the Roman Catholic Church, this "porter" became the lowest of the four minor orders prescribed by the Council of Trent. This was the first order a seminarian was admitted to after receiving the tonsure. The porter had in ancient times the duty of opening and closing the church-door and of guarding the church; especially of ensuring no unbaptised persons would enter during the Eucharist. Later on, the Porter would also guard, open and close the doors of the Sacristy, Baptistry and elsewhere in the church.
The porter was not a part of Holy Orders administering sacraments but simply a preparatory job on the way to the Major orders: subdiaconate (until its suppression, after the Second Vatican Council by Paul VI), diaconate and the priesthood. Like the other minor orders and the subdiaconate, it is retained in Indult Catholic societies such as the Priestly Fraternity of St. Peter.
Porter denoted among the Romans the slave whose duty it was to guard the entrance of the house. In the Roman period all houses of the upper classes had an ostiarius, or ostiary, whose duties were considered very inferior. A basilica originally served as a Roman court of law, and it was the duty of the ostiarius to regulate the approach of litigants to the judge.