A system and method for retaining a linear actuator on a crane component such as a mast is disclosed. In the system a retaining mechanism is mounted on either a body of the linear actuator or the crane component and a catch is mounted to the other of the body or the crane component. Retraction of a rod of the linear actuator causes a cap on the rod to contact the retaining mechanism, which causes the retaining mechanism to move into a latched configuration securing the linear actuator.