Q. If someone lives in a houseboat or a large boat, does he have to place mezuzos?
A. Poskim disagree. Shulchan Aruch (Y.D. 286: 11) rules that a sefina or ship is exempt from having mezuzos. However, Shach (21) and Aruch Hashulchan (27) mention that the reason they are not liable is because they are diras arai or only a temporary abode. Therefore some Poskim maintain that ship cabins and staterooms in our days, that are well build and permanent, should have mezuzos placed. (Aruch Hashulchan ibid., Minchas Yitzchok 2: 84, 4: 55, Piskei Uziel 30, and others. See Kehilas Yaakov- Eiruvin 17 and Menochos 26).
Shevus Yitzchok (13: n. 41) quotes that Horav Eliashiv zt’l ruled that the reason a ship is exempt, is due to the teaching (Tomid 32a) that people who travel on the seas, their mind settles only when they reach the shore. Therefore, one should not recite a blessing when placing that mezuza. Betzel Hachochma (2: 82) asserts that a sefina is exempt since people don’t establish their abode in the middle of the seas. (See also question 2035 regarding a mezuza on an igloo and 1226 on a trailer).
It would appear from the above opinions, that one who constantly lives in an anchored houseboat or large boat, does have to place a mezuza on it.
Horav Shlomo Miller’s Shlit’a opinion is that if the houseboat still travels, it is exempt of Mezuza.
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a