CCP 3824     

Art. 3824.  Method of service

A writ of habeas corpus shall be served upon the party to whom it is addressed or who has the person in custody in the manner provided by Articles 1232 and 1233.  If personal service cannot be made, service may be made by attaching the writ to an entrance door of the residence of the party to be served or to a door of the place where the person is in custody.