By Agence France-Presse
The pair, aged 20 and 23, were last week found guilty of having broken sharia rules in conservative Aceh province -- the only part of Indonesia that implements Islamic law -- and sentenced to 85 strokes of the cane each.
The men, whose identities have not been revealed, were caught together in March by vigilantes who burst into the house where they were staying in the provincial capital Banda Aceh.
Public caning has long been common for offences such as gambling and drinking in Aceh, which was given the right to implement sharia law in 2001 as part of a deal with the central government aimed at ending an insurgency.
But Tuesday's caning will be the first time such a punishment has been meted out for gay sex since a sharia regulation came into force two years ago banning the practice.
Gay sex is not illegal elsewhere in Indonesia, which has the world's biggest Muslim population.
After the men were sentenced last week by a sharia court, Amnesty International urged authorities in Aceh to revoke their convictions.
"Laws criminalising consensual sexual activity contravene international human rights law and standards," the rights group said in a statement.
"Under international human rights law, the use of caning as a punishment constitutes cruel, inhuman and degrading punishment and may amount to torture."
The caning is expected to be carried out on Tuesday morning in front of a mosque in Banda Aceh.
There has been a growing backlash against Indonesia's small lesbian, gay, bisexual and transgender (LGBT) community over the past year, with ministers, hardliners and influential Islamic groups lining up to publicly denounce homosexuality.
The caning comes just two days after police in Jakarta detained 141 men including several foreigners for allegedly taking part in a gay sex party at a sauna.
Officers raided the sauna and halted what they said was a party promoted as "The Wild One".
Although homosexuality is not illegal outside Aceh, police said 10 of those arrested at the party could be charged under the country's tough anti-pornography laws.