Deuteronomy 15:16-17

15:16 However, if the servant says to you, “I do not want to leave you,” because he loves you and your household, since he is well off with you, 15:17 you shall take an awl and pierce a hole through his ear to the door. Then he will become your servant permanently (this applies to your female servant as well).