The passenger boat was ferrying around 200 people off the coast of Jakarta to Tidung island, a tourist destination 50 kilometres (30 miles) from the capital when the fire started, local disaster agency official Seply Madreta told AFP.
"So far two people are dead, 17 injured and 17 other people are still missing," said Madreta, adding that 194 people had been rescued.
The cause of the fire is still unknown.
Officials are still trying to locate the boat's manifest to determine the number of passengers that were on board the vessel, a transport ministry official said.
The Indonesian archipelago of more than 17,000 islands is heavily dependent on boat transport, but safety standards are lax and fatal accidents common.
In early November at least 54 people died after a overcrowded speedboat was carrying three crew and 98 passengers, mostly Indonesian migrant workers, from Malaysia to Batam struck a reef and sunk.