In this paper, the performance of an unmanned aerial vehicle (UAV)-based free-space optical relay system with amplify-and-forward relaying is analyzed. In particular, the statistical probability of end-to-end signal-to-noise ratio at the destination is obtained under a general condition that takes into account the effects of nonzero boresight pointing errors along with the effects of orientation and position fluctuations of the UAV relay, the UAV position with respect to the source and destination nodes, the optical beamwidth, turbulence strength of both source-to-relay and the relay-to-destination links. Subsequently, the closed-form expressions are derived for the bit-error rate and outage probability of the considered system. The accuracy of the analytical expressions is verified by performing extensive simulations. Analytical results are then utilized to study of the relationship between the optimal system parameters design and UAV's position in the sky. The results show that the optimal UAV's position that achieves a minimum outage probability highly depends on the optical beamwidth at the destination. Moreover, to achieve a minimum outage probability, the relay-to-destination link length must be shorter than source-to-destination (SR) link and by deceasing beamwidth at the destination, the optimal value for SR link length increases.