Hydraulic piping for an aircraft or spacecraft, wherein a hydraulic pipe is connected to a pipe connection element with a rotary joint, the rotary joint comprising: a first annular socket flange having a partly spheroid first concave bearing surface; a first annular ball flange having a partly spheroid first convex bearing surface, wherein the curvature of the first concave bearing surface of the first annular socket flange corresponds to the curvature of the first convex bearing surface of the first annular ball flange, wherein the first annular socket flange or the first annular ball flange embraces an outer pipe wall of the hydraulic pipe to be in mechanical connection with the hydraulic pipe, and wherein the respective other of the first annular socket flange and the first annular ball flange is formed at the pipe connection element; a union nut; a second annular socket flange having a partly spheroid second concave bearing surface being concentric to the first concave bearing surface; and a second annular ball flange having a partly spheroid second convex bearing surface being concentric to the first convex bearing surface, wherein the curvature of the second concave bearing surface of the second annular socket flange corresponds to the curvature of the second convex bearing surface of the second annular ball flange, and wherein the second annular socket flange or the second annular ball flange is formed around the union nut, and wherein the respective other of the second annular socket flange and the second annular ball flange is formed at the pipe connection element; wherein the first annular socket flange or the first annular ball flange embracing the outer pipe wall of the hydraulic pipe comprises a sheath around the outer pipe wall of the hydraulic pipe, and wherein the union nut is screwed onto the sheath. a first annular socket flange having a partly spheroid first concave bearing surface; a first annular ball flange having a partly spheroid first convex bearing surface, wherein the curvature of the first concave bearing surface of the first annular socket flange corresponds to the curvature of the first convex bearing surface of the first annular ball flange, wherein the first annular socket flange or the first annular ball flange embraces an outer pipe wall of the hydraulic pipe to be in mechanical connection with the hydraulic pipe, and wherein the respective other of the first annular socket flange and the first annular ball flange is formed at the pipe connection element; a union nut; a second annular socket flange having a partly spheroid second concave bearing surface being concentric to the first concave bearing surface; and a second annular ball flange having a partly spheroid second convex bearing surface being concentric to the first convex bearing surface, wherein the curvature of the second concave bearing surface of the second annular socket flange corresponds to the curvature of the second convex bearing surface of the second annular ball flange, and wherein the second annular socket flange or the second annular ball flange is formed around the union nut, and wherein the respective other of the second annular socket flange and the second annular ball flange is formed at the pipe connection element; wherein the first annular socket flange or the first annular ball flange embracing the outer pipe wall of the hydraulic pipe comprises a sheath around the outer pipe wall of the hydraulic pipe, and wherein the union nut is screwed onto the sheath.