  We study a class of general U$(1)^\prime$ models to explain the observed dark
matter relic abundance and light neutrino masses. The model contains three
right handed neutrinos and three gauge singlet Majorana fermions to generate
the light neutrino mass via the inverse seesaw mechanism. We assign one pair of
degenerate sterile neutrinos to be the dark matter candidate whose relic
density is generated by the freeze-in mechanism. We consider different regimes
of the masses of the dark matter particle and the ${Z^\prime}$ gauge boson. The
production of the dark matter can occur at different reheating temperatures in
various scenarios depending on the masses of the ${Z^\prime}$ boson and the
dark matter candidate. We also note that if the mass of the sterile neutrino
dark matter is $\gtrsim 1 \rm{MeV}$ and if the $Z^\prime$ is heavier than the
dark matter, the decay of the dark matter candidate into positrons can explain
the long standing puzzle of the galactic $511\rm{keV}$ line in the Milky Way
center observed by the INTEGRAL satellite. We constrain the model parameters
from the dark matter analysis, vacuum stability and the collider searches of
heavy ${Z^\prime}$ at the LHC. For the case with light $Z^\prime$, we also
compare how far the parameter space allowed from dark matter relic density can
be probed by the future lifetime frontier experiments SHiP and FASERs in the
special case of $U(1)_{B-L}$ model.
