Dua When Leaving the House

Bismi-llāhi tawakkaltu ʿalal-llāh, lā ḥawla wa lā quwwata illā bi-llāh.
Translation:- In the Name of Allah, I have placed my trust in Allah. There is no power (in averting evil) or strength (in attaining good) except through Allah.
The Prophet Muhammad ﷺ stated: “Anyone who Read the mentioned supplication upon leaving their house will be told: ‘You have been guided, you have been sufficed, and you have been protected.’ Subsequently, one devil says to another devil: ‘How can you approach a person who has been guided, sufficed, and protected?'” (Reported in Abū Dāwūd 5095, Tirmidhī 3426)
Dua When Entering the Home

Allāhumma innī as’aluka khayra-l-mawlaj, wa khayra-l-makhraj, bismi-llāhi walajnā, wa bismi-llāhi kharajnā, wa ʿalā-llāhi rabbinā tawakkalnā.
Translation:- O Allah, I ask You for the best entrance and the best exit. In the Name of Allah, we enter, in the Name of Allah we leave, and in Allah our Lord do we trust.
The Prophet Muhammad ﷺ said: “When a person enters his home, he should say [the above dua]. Then he should greet his family.” (Abu Dawood 5096)