Macedonians will also vote on joining the NATO military bloc and the European Union on September 30.
The Macedonian parliament on Monday set September 30 as the date for a referendum on NATO and EU membership bids and its agreement with Greece on the country's name.
Sixty-eight deputies in the 120-seat parliament voted in favour of holding a referendum on the question, "Are you in favour of NATO and EU membership, and accepting the name agreement between the republic of Macedonia and Greece?"
The opposition nationalist VMRO-DPMNE deputies were not present at the session.
In June, NATO sent an invitation to Macedonia to begin accession talks with the alliance, following a landmark accord with Greece over the former Yugoslav republic's name.
Greece refused to accept the country's name, saying it implied territorial claims on the Greek province of Macedonia and amounted to an appropriation of its ancient civilisation. It had blocked the country's EU and NATO membership bids.
After a period of political crisis, the government of Prime Minister Zoran Zaev, elected in 2017, pushed for an agreement with Greece to solve the name dispute and the two sides have agreed on the name of Republic of North Macedonia.
Nationalists, including President Gjorge Ivanov, and VMRO-DPMNE oppose the deal saying it is against the constitution. They also oppose the referendum.
"The question that is proposed by the government is against the law ... it is manipulative," said Igor Janusev, VMRO-DPMNE secretary general.