§1. If a person competent to assist according to the norm of law cannot be present or approached without grave inconvenience, those who intend to enter into a true marriage can contract it validly and licitly before witnesses only: 1/ in danger of death; 2/ outside the danger of death provided that it is prudently foreseen that the situation will continue for a month.
§2. In either case, if some other priest or deacon who can be present is available, he must be called and be present at the celebration of the marriage together with the witnesses, without prejudice to the validity of the marriage before witnesses only.
Source: Code of Canon Law (Vatican.va)