You can form a UK limited company regardless of your nationality or location. You do need a UK registered office address, which we can provide you with and forward on your official mail.
You will also need a bank account, and setting up a bank account requires more administration and will be more costly if you are based overseas.