You must be a citizen of the United Kingdom or holder of dual UK/other nationality.
Whether or not you were born in the United Kingdom, you should have resided there for the 5 years immediately preceding your application. However, candidates with a minimum of 3 years will be considered.
Following the Home Office announcement that the UK Armed Forces will now be able to recruit commonwealth citizens without the 5 year residency requirement, please note that the RAF continues to apply standard residency requirements for security clearance, ie, DV employment requires 7-years UK residency immediately prior to enlistment; SC requires 3-years.