Hydraulic cylinder seals are located inside of the cylinder barrel. Seals may be installed on the end cap at the base of the cylinder or at the rod end, but all cylinders will have one or more very important seals installed on the piston. The piston moves back and forth in the barrel of the cylinder, so the seal must hold even while the piston is actuating. You'll have to completely disassemble your cylinder to install a new seal.
Bring the parts to a clean work area suitable for doing hydraulic maintenance.
Clean and dry the parts that will be sealed, then inspect them for scratches or cuts that could damage seals and cause leaks.
Smooth any rough parts with an emery cloth.
Clean all the seals so that they are free from any foreign matter.
Slide O-ring seals over the components you are sealing. A component that takes an O-ring seal will have a groove that seats the O-ring, cut into that component
Install any backup rings needed behind O-ring seals. Pressure should toward the O-ring seal first, then the backup ring.
Slide most piston seals on like an O-ring seal, But you may have to use special techniques to install some piston seals. For instance, some seals are so rigid they need to be soaked in hot water to make them pliable enough to install. These seals may also have to shrunk with a special tool before being installed.
A cylinder seal kit is available for each cylinder. It contains all the seals a mechanic will need the rebuild a cylinder. You may also want to refer to the cylinder illustrated parts breakdown, if available. It will show exactly which seals go into which locations.