  We provide a general framework for self-interacting warm dark matter (WDM) in
cosmological perturbations, by deriving from first principles a Boltzmann
hierarchy which retains certain independence from a particular interaction
Lagrangian. We consider elastic interactions among the massive particles, and
obtain a hierarchy which is more general than the ones usually obtained for
non-relativistic (as for cold DM) or for ultra-relativistic (as for neutrinos)
approximations. The more general momentum-dependent kernel integrals in the
Boltzmann collision terms, are explicitly calculated for different
field-mediator models, including examples of a scalar field (either massive or
massless) or a massive vector field. As an application, we study the evolution
of the interaction rate per particle under the relaxation time approximation,
and assess when a given self-interaction is relevant in comparison with the
Hubble expansion rate. Our framework aims to be a useful starting point to
evaluate DM self-interaction effects in the linear power spectrum, necessary to
then study its evolution all the way to non-linear stages of structure
formation, where certain DM interactions were proven to be relevant.
