We study the relaxation of long chains of magnetic nanoparticles (MNPs). In spite of the simplicity of this system, there is no theoretical framework for this basic assembly. Using the two-level approximation for energy, we perform first-principles calculations and kinetic Monte Carlo (kMC) simulations to obtain the effective relaxation time tau(N) of the chain by incorporating the effects of dipole-dipole interactions and anisotropy axes orientation of the MNPs. For analytical tractability, we consider the case when all easy-axis and initial magnetic moments make an angle alpha with the chain axis. In the absence of dipolar interactions, the relaxation is governed, as expected, by the usual Ned relaxation time tau(0)(N). In the presence of interactions, the magnetic relaxation curve is always perfectly fitted by an exponentially decaying function. The dipolar field induces antiferromagnetic or ferromagnetic interactions between the moments: depending on alpha values, this induces a fastening of relaxation time (tau(N) < tau(0)(N)) or a slowing down (tau(N) > tau N-0). The analytical determination of tau(N) is nontrivial, but we have obtained an approximate form that is confirmed by kMC simulations. Finally, it is shown that the equilibrium state is comprised of short-lived ferromagnetic and antiferromagnetic domains, the size of which increases with the dipolar strength. We believe that the above conclusions can be drawn for chains with more complicated structures exhibiting bends, curls, and intersections in higher dimensions. Our study is relevant in the context of applications such as magnetic recording, digital data processing, and magnetic hyperthermia, in which long chains of MNPs are ubiquitous.