The writ can be served only by a legal voter of the state. The judge granting it may require a bond to the state in a sum not more than $1,000, conditioned for the payment of all costs and expenses of the proceeding, and the reasonable charges of restoring the petitioner, if sent back to custody, to the person from whose custody the petitioner was taken. The bond must be approved by the judge issuing the writ, and be filed with the court administrator.