  We investigate the interactions of energetic hadronic particles (cosmic ray
protons) with photons and baryons in protogalactic environments, where the
target photons are supplied by the first generations of stars to form in the
galaxy and the cosmological microwave background, while the target baryons are
the interstellar and circumgalactic medium. We show that pair-production and
photo-pion processes are the dominant interactions at particle energies above
$10^{19}\;\! {\rm eV}$, while ${\rm pp}$-interaction pion-production dominates
at the lower energies in line with expectations from, for example $\gamma$-ray
observations of star-forming galaxies and dense regions of our own galaxy's
interstellar medium. We calculate the path lengths for the interaction channels
and determine the corresponding rates of energy deposition. We have found that
protogalactic magnetic fields and their evolution can significantly affect the
energy transport and energy deposition processes of cosmic rays. Within a Myr
after the onset of star-formation the magnetic field in a protogalaxy could
attain a strength sufficient to confine all but the highest energy particles
within the galaxy. This enhances the cosmic ray driven self-heating of the
protogalaxy to a rate of around $10^{-24}\;\! {\rm erg} \;\!{\rm cm}^{-3}\;\!
{\rm s}^{-1}$ for a galaxy with strong star-forming activity that yields 1 core
collapse SN event per year. This heating power exceeds even that due to
radiative emission from the protogalaxy's stellar populations. However, in a
short window before the protogalaxy is fully magnetised, energetic particles
could stream across the galaxy freely, delivering energy into the
circumgalactic and intergalactic medium.
