Indonesia's geophysics agency issued a tsunami warning for coastal communities in Morowali district, but there were not immediate reports of casualties or damage.
Indonesia issued the alert on Friday, urging people to evacuate to higher ground after the quake stuck off the coast of its island of Sulawesi.
The agency is monitoring for high waves as the quake had the potential to trigger a tsunami, it added.
But damage is possible in poorly built or badly designed structures, the United States Geological Survey said.
One person trying to flee fell and died, Kompas.com news website reported, citing a provincial health worker.
Google Cloud introduces Anthos, a hybrid cloud management product based on Kubernetes
Google Cloud also announced the beta release of its new "connected sheets" functionality in Google Sheets, its spreadsheet offering.
The quake was "strong and long-lasting", Gina Saerang, a resident of Manado in Sulawesi, was quoted by Reuters as saying.
Palu, Indonesia is an quake prone area.
Indonesia is prone to earthquakes and volcanic eruptions due to its location on the seismically active Pacific "Ring of Fire".
On boxing day December 26, 2004, a 9.1-magnitude natural disaster struck westernmost Aceh province, causing a tsunami and killing more than 170,000 in Indonesia.
More than 4,400 people were killed in the Palu disaster.
Looping from New Zealand to Chile, around 90% of the world's earthquakes occur in this belt which is also home to more than 450 volcanoes.