An ostiarius, a Latin word sometimes anglicized as ostiary but often literally translated as porter or doorman, originally was an enslaved person or guard posted at the entrance of a building, similarly to a 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 to ensure 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 Pope Paul VI), diaconate and the priesthood. Like the other minor orders and the subdiaconate, it is retained in societies such as the Priestly Fraternity of St. Peter.