A writ of habeas corpus issued under this chapter may be served by delivering it to the person to whom it is directed, together with a copy of the complaint.
If the person to whom the writ is directed cannot be found, then the writ may be served by leaving it, together with a copy of the complaint, at the jail or other place in which the prisoner may be confined, with an under officer or other person having charge of the prisoner at the time.
If the person to whom the writ is directed conceals himself or refuses admittance, then the writ may be served by affixing it, together with a copy of the complaint, in some conspicuous place on the outside, either of his dwelling house or of the place where the party is confined.
Except when the writ is issued on application of the attorney general, county prosecutor or on the court's own motion, no service of a writ requiring the production of the person confined or restrained with the return shall be valid upon a sheriff, keeper of the jail or other public officer, unless the party serving the writ shall pay or tender to the officer, in whose custody the prisoner shall be, his fees and charges, allowed by law, for bringing the prisoner to and returning him from the place to which he is to be taken pursuant to the writ, and shall also deliver to the officer such bond, if any, as the court may have directed when authorizing the issuance of the writ. If the prisoner shall be discharged, the officer shall repay the money so paid to him for the charges of carrying back such prisoner.
No service on any other person shall be valid unless the party serving the writ shall pay or tender to such person the charges, if any, required by the court or judge issuing the writ and set forth therein.
N.J.S. § 2A:67-19