But the Taliban say they will stop fighting for three days.
It would last "from the 27th of Ramadan until the fifth day of Eid-al-Fitr", Ghani tweeted from an official account, indicating it could run till June 19.
FILE - Afghan President Ashraf Ghani speaks during during a peace and security cooperation conference in Kabul, Afghanistan, Feb. 28, 2018. "So, nevertheless, we hope that the combination of the two will trigger further engagement and real peace dialogue", said Mayaudon.
"I don't think the Haqqani Network will be on board (with the ceasefire)", a foreign diplomat in Kabul told AFP.
The decision was made "in order to make Eid days and nights happy for the people of Afghanistan", the group said in a statement.
In the meantime, insurgents have continued to carry out attacks on Afghan forces.
Farhad said one soldier was wounded. "They will kill more to make up for their ceasefire days".
Temori said seven others were wounded in Qala-e Zal district. A Defense Ministry spokesman said Taliban also were killed in fighting in 10 provinces.
The palace statement referred to a gathering of Afghanistan's top clerics last week in which they issued a decree against suicide attacks and called for peace talks. "Insurgents have set fire to two military Humvees as well as the checkpoint", he said.
Taliban spokesman Zabiullah Mujahid said the truce was intended for the Eid holiday and would not affect the group's larger objectives, which include the removal of foreign troops from Afghanistan.
However, U.S. -led North Atlantic Treaty Organisation forces are exempt from the ceasefire, with the Taliban saying they would continue to attack "foreign invaders", the Wall Street Journal reported.
Now headed by Mawlawi Hibatullah Akhundzada after a US drone strike killed Mansour in Pakistan in 2016, the main Taliban group said its cease-fire during the three days of the Eid celebration would only apply to government forces, not their foreign backers.