In this paper we provide sufficient conditions for stochastic invariance of closed convex cones for stochastic partial differential equations (SPDEs) of jump-diffusion type, and clarify when these conditions are necessary. We emphasize that the diffusion coefficient of the SPDE does not need to be smooth, an assumption which is frequently imposed when dealing with stochastic invariance problems. Our results apply to the positive cone of abstract $$L^2$$
L
2
-spaces. Furthermore, we present a series of applications, where we investigate SPDEs arising in natural sciences and economics.