The Earth's main magnetic field is thought to be generated by motions in the planet's fluid outer core, which lead to an effect similar to that of a dynamo. Recent high-resolution numerical simulations produce only a non-dipolar or a dipolar but comparatively weak magnetic field unlike that of the Earth. Older models that did generate a strong, Earth-like field needed to use unrealistically high viscosities for the core fluid. Common to most of the models is the assumption of a laterally uniform core-surface temperature. Here we use a low-viscosity geodynamo model to evaluate the effect of a different and more realistic boundary condition-a uniform heat flux at the surface of the core-on the simulation of an Earth-like magnetic field. Our results show that when the surface temperature is laterally uniform, only a weak magnetic field is generated because planetary-scale fluid circulations are suppressed. In contrast, a laterally uniform heat flux at the core's surface leads to large-scale convective flows, and a comparatively strong dipole-type magnetic field. Contrary to previous work, we suggest that thermal conditions at the core surface have a strong effect on low-viscosity geodynamo models.