Positive commandment · Mitzvat Aseh #235 of 613
To have a Canaanite servant serve forever
לעבוד בעבד כנעני לעולם
The verse · Vayikra 25:46
וְהִתְנַחַלְתֶּם אֹתָם לִבְנֵיכֶם אַחֲרֵיכֶם לָרֶשֶׁת אֲחֻזָּה לְעֹלָם בָּהֶם תַּעֲבֹדוּ וּבְאַחֵיכֶם בְּנֵי־יִשְׂרָאֵל אִישׁ בְּאָחִיו לֹא־תִרְדֶּה בוֹ בְּפָרֶךְ
“And you shall take them as an inheritance for your children after you, to inherit them for a possession; they shall be your bondmen for ever: but over your brethren the children of Yisra᾽el, you shall not rule one over another with rigour.”
The Rambam’s words
To have a Canaanite servant serve forever, as [Leviticus 25:46] states: "You shall have them serve you forever."
לעבוד בעבד כנעני לעולם, שנאמר: "לעולם, בהם תעבודו" (ויקרא כה,מו).
Why · Sefer HaChinuch #347
Work with a Canaanite slave forever
“It is from the roots of the commandment [that] since the people of Israel are the choicest of the human species and they were created to recognize their Creator and to serve in front of Him, it is fitting that they should have slaves to serve them.”
Who & when
“And [it] is practiced in every place and at all times by males and females.”
Where in the Mishneh Torah
Hilchot Slaves הלכות עבדים