Dreamerkk wroteI am a United States citizen and my husband is an Algerian Citizen and we have an online business. We have been to Bali and we love it and neither one of us needs a visa to visit but if we wanted to stay permanently is there some way to do that using our online business?
Hi Dreamerkk and welcome to the forum where I hope you will get some help in your venture.
The short answer is that your on-line activity will have no benefit to you getting any permanent residency in Indonesia.The only way to get residency is by forming a PTPMA company (similar to an LLC in USA).
This PTPMA formation is expensive and onerous to achieve and probably not available for an on-line business. There is a list of businesses which are categorized for foreign investment.
Indonesia, frankly, doesn't really welcome foreigners. They like tourists who arrive, drop lots of cash, and depart.
Even if you wish to reside in Indonesia, and some here can help to describe those methods, running your on-line business from here is a grey area as any foreigner, normally working in Indonesia, needs a work permit.