We show how the Onsager algebra, used in the original solution of the two-dimensional Ising model, arises as an infinite-dimensional symmetry of certain self-dual models that also have a symmetry. We describe in detail the example of nearest-neighbour n-state clock chains whose symmetry is enhanced to . As a consequence of the Onsager-algebra symmetry, the spectrum of these models possesses degeneracies with multiplicities 2N for positive integer N. We construct the elements of the algebra explicitly from transfer matrices built from non-fundamental representations of the quantum-group algebra . We analyse the spectra further by using both the coordinate Bethe ansatz and a functional approach, and show that the degeneracies result from special exact n-string solutions of the Bethe equations. We also find a family of commuting chiral Hamiltonians that break the degeneracies and allow an integrable interpolation between ferro- and antiferromagnets.