An ostiarius, a Latin word sometimes anglicized as ostiary but often literally translated as porter or doorman, originally was a slave 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.