We simulate by lattice Boltzmann the nonequilibrium steady states of run-and-tumble particles (inspired by a minimal model of bacteria), interacting by far-field hydrodynamics, subject to confinement. Under gravity, hydrodynamic interactions barely perturb the steady state found without them, but for particles in a harmonic trap such a state is quite changed if the run length is larger than the confinement length: a self-assembled pump is formed. Particles likewise confined in a narrow channel show a generic upstream flux in Poiseuille flow: chiral swimming is not required.