A police officer said the bomb had apparently been planted under a seat and was detonated by remote control. But witnesses suggested the explosion could also have been from a roadside bomb that was detonated as the minibus, which is used to transport staff from a guesthouse to the UN compound, was passing.
No group immediately claimed the responsibility for the attack.
"Investigations are still ongoing to establish how it happened but I can confirm you that the UN compound was not affected," police officer Abdullahi Mohamed told the DPA news agency.
While bomb attacks are common in southern Somalia, where al-Shabab militias are fighting against the government, they are unusual in the northern parts of the country.
On Saturday, however, al-Shabab gunmen shot dead Puntland lawmaker, Adan Haji Hussein.
The al-Shabab rebels are fighting to overthrow Somalia's internationally backed government. They have also carried out revenge attacks across the wider region against countries which contribute troops to the African Union force in Somalia, AMISOM.
The al-Shabab attacks on key government and security sites are an attempt to discredit claims by the government and AU troops that they are winning the war.
rg/jil (AFP, AP, Reuters, dpa)DW