There is another method: if the joint bearing is not big (small), such as M5, M6 and M8, it is convenient to calculate the thickness of the cylinder tail and drill directly for installation. Our company often does this, and the female joint bearing is fitted with corresponding bolts.
Both methods are available, depending on the actual situation.