Exod 21:5-6

5But if the slave declares, “I love my master, my wife, and my children; I will not go out a free person,”6then his master shall bring him before God. He shall be brought to the door or the doorpost; and his master shall pierce his ear with an awl; and he shall serve him for life.