Bs”d
Q. I have been asked by a number of Bnai Noach if it is permissible for them to put up a Mezzuza on their front door. If there is a nafka mina between the front door which is public and inside of the apartment or house, which is private, would the inside be permissible if the outside isn’t?

A. Although Rambam (Perush Hamishnayos – Terumos 3: 9, H. Melochim 10: 10) teaches that a Ben Noach is rewarded with some remuneration for observing the mitzvos he was not ordained to do, he should abstain from the ones that carry kedusha and tahara, such as tefilin, Sefer Torah and mezuzah. (Ridvaz ibid.)
Minchas Kino’os (9: 35) quotes Talmud Yerushalmi (Peah 1: 1) that Rebbi sent Artaban a mezuzah with the intention of providing some security and protection for him. (It is of interest that Yerushalmi Avoda Zarah 2: 1, says in the future Bnai Noach will accept all mitzvos including mezuzah).
Veshav Verofo (Y.D. 58) quotes Rav Ovadya Yosef zt’l as permitting placing a mezuzah in a Ben Noach’s house, when one knows that he will honour it properly.
However, Yalkut Yosef (Kivud Av Va’em 6: 15) mentions that if an ill Gentile father asks his son to place a mezuzah on his door for protection, he should abstain.
Horav Shlomo Miller’s Shlit’a opinion is that if the Noahide is careful to honour the mezuzah properly, he may place it in the inner rooms, but not on the outside of the entrance door.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a