The quake in the Mentawai Islands west of Sumatra struck at a depth of 27 km on Sunday and was followed by one of magnitude 5.3 in the same area, the country's disaster mitigation agency BNPB said. There was no danger of tsunami.
One person was injured in the head by falling wood, and a school and health centre were among properties slightly damaged, the disaster agency said.
Mentawai resident Nurjuli Hasanah told Reuters the quake felt strong and shook her wooden house.
"Some of (the residents) are still in an evacuation shelter and some have gone back home," she said.
Also on Sunday, east of the vast Indonesian archipelago, an earthquake of magnitude 7.6 struck the Eastern New Guinea region in PNG, reportedly damaging property and spreading panic among residents.
The quake hit at 6.46am on Sunday. There were no reports of casualties.
The quake was at a depth of 80 kilometres the European Mediterranean Seismological Centre said.
The US tsunami warning system issued a tsunami warning after the quake but later said the threat had passed.
There was no immediate tsunami threat to Australia, the Bureau of Meteorology said.
Residents took to social media sharing images and videos of cracked roads, damaged buildings and cars, and items falling off supermarket shelves.
Earthquakes are common in PNG and Indonesia, which sit on the Pacific Ocean's Ring of Fire, a hotspot for seismic activity due to friction between tectonic plates.
A magnitude 7.5 quake rocked PNG's remote mountainous highlands in 2018, killing more 100 people and damaging thousands of homes.