  A general definition of energy is given, via the N\"other theorem, for the
N-body problem in (1+1) dimensional gravity. Within a first-order Lagrangian
framework, the density of energy of a solution relative to a background is
identified with the superpotential of the theory. For specific applications we
reproduce the expected Hamiltonian for the motion of N particles in a curved
spacetime. This Hamiltonian agrees with that found through an ADM-like
prescription for the energy when the latter is applicable but it also extends
to a wider class of solutions provided a suitable background is chosen.
