A diesel generator is the combination of a diesel engine with an electric generator (often an alternator) to generate electrical energy. This is a specific case of engine-generator. A diesel compression-ignition engine often is designed to run on fuel oil, but some types are adapted for other liquid fuels or natural gas.
Diesel generating sets are used in places without connection to a power grid, or as emergency power-supply if the grid fails, as well as for more complex applications such as peak-lopping, grid support and export to the power grid.