"Workers should be able to get their messages across to officials by forming their own free associations," Rouhani said in his address, the semiofficial Fars news agency reported. "The government should not interfere in these unions and associations."
Analysts say independent trade unions are not tolerated in Iran, where most labor groups are linked to the government apparatus.
During his election campaign last year, Rouhani vowed to make it easier for workers to form independent trade unions or associations. But critics say the president has yet to move on that vow, one of a number of unfulfilled campaign promises cited by disenchanted supporters of the president.
Rouhani, a moderate cleric and a pragmatist, was elected with considerable support from pro-reform voters in Iran, including young people and urban elites. But many say they are still awaiting broader reforms.
Opposition websites reported that 20 workers were detained Thursday while they were en route to what was apparently a nonsanctioned celebration of International Labor Day. The holiday is known in Iran as the National Appreciation of Workers Festival.
In recent days, the government has warned that only officially recognized labor rallies would be tolerated on May 1.