  In this paper, first we introduce the notions of relative Rota-Baxter
operators of nonzero weight on $3$-Lie algebras and $3$-post-Lie algebras. A
3-post-Lie algebra consists of a 3-Lie algebra structure and a ternary
operation such that some compatibility conditions are satisfied. We show that a
relative Rota-Baxter operator of nonzero weight induces a $3$-post-Lie algebra
naturally. Conversely, a $3$-post-Lie algebra gives rise to a new 3-Lie
algebra, which is called the subadjacent 3-Lie algebra, and an action on the
original 3-Lie algebra. Then we construct an $L_\infty$-algebra whose
Maurer-Cartan elements are relative Rota-Baxter operators of nonzero weight.
Consequently, we obtain the twisted $L_\infty$-algebra that controls
deformations of a given relative Rota-Baxter operator of nonzero weight on
3-Lie algebras. Finally, we introduce a cohomology theory for a relative
Rota-Baxter operator of nonzero weight on $3$-Lie algebras and use the second
cohomology group to classify infinitesimal deformations.
