The founding father of the Lanfang Republic was Luo Fangbo who hailed from Meizhou in Guangdong Province. Chinese settlers have long lived in Borneo island, with most engaging in trading and mining. They formed their own companies, among which was the Southern Company headed by Luo.

As Dutch imperialism encroached upon modern-day Indonesia, Luo established the Lanfang Republic in 1777 (with its capital in East Wanjin) to protect the Chinese settlers and other indigenous peoples from Dutch oppression.[13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29][30] The settlers subsequently elected Luo as their inaugural president. Luo implemented many democratic principles, including the idea that all matters of state must involve the consultation of the republic's citizenry. He also created a comprehensive set of executive, legislative, and judicial agencies. The Republic did not have a standing military, but had a defense ministry that administered a national militia based on conscription. During peacetime, the populace mostly engaged in farming, production, trading, and mining. Lanfang's administrative divisions included three tiers (province, prefecture, and county) with the people electing leaders for all levels. Langfang was allied with Sultan Abdurrahman of the Pontianak Sultanate.[31][32][33][34][35]

Although Luo discarded the ancient institutions of monarchism and dynastic succession, he continued to adhere to many Chinese traditions. For example, he established the founding year of the republic as the first year of the calendar. Moreover, he submitted a report to the Chinese emperor notifying him about the Republic's founding and paid tribute to the Chinese Qing Empire.

Luo served as head of state until his death in 1795. Afterwards, Lanfang citizens elected Jiang Wubo (江戊伯) as their next president. Lanfang citizens elected a total of twelve leaders, who helped improve agricultural techniques, expand mine production, develop cultural education, and organize military training. These measures allowed Lanfang to increase its wealth and power, which encouraged the non-Chinese indigenous population to pledge their allegiances to Lanfang.

Although the Republic had both ethnic Chinese citizens (numbering in the tens of thousands) and indigenous subjects (numbering in the hundreds of thousands), the ethnic Chinese were the only ones who voted in presidential elections. Thus, Luo would not dare call himself a king in front of the ethnic Chinese citizens, but was not afraid to do so in front of his indigenous subjects.

In the mid-to-late 19th century, the Chinese Qing Empire weakened substantially and became increasingly unable to support the Lanfang Republic as its vassal state. Thus, Lanfang Republic's vigorous development suffered from the eventual expansion of the Dutch. The Republic's citizenry waged a tenacious resistance, but ultimately failed due to poor weaponry. Lin Ah Sin was the last leader of Langfang.[36] Many of Lanfang's citizens and their descendants made their way to Sumatra or Singapore, which subsequently became another ethnic Chinese republic in Southeast Asia. The three campaigns waged by the Dutch East Indies Army against the Chinese kongsi, called the Kongsi Wars, were:

This last one resulted in the subjugation of the Chinese and the loss of autonomy.

Wary of Qing intervention, the Dutch did not openly annex the Lanfang Republic, and created another puppet regime. It was not until 1912, when the Qing Dynasty collapsed, when the Dutch proclaimed their occupation.

The Sarawak Museum Journal. Volume 9 of The Sarawak Museum Journal: For the Promotion of Scientific Knowledge and Study of the Natives and Natural History of the Island of Borneo, Sarawak Museum. Contributor Sarawak Museum. Sarawak Museum. 1959. Retrieved 24 April 2014.