You can get the O inside Thailand if you already have a Thai bank account but the easiest way is to get it in your home Country, you then have no problems opening a Thai bank account in preparation for the yearly extension of stay. This is the route most people take.