Diesel engines can run on anything that is similar to diesel.
For a diesel engine to run you need a fuel that will ignite without a spark plug which is how a diesel engine is designed to run.
Unlike gasoline engines, a diesel engines does not require spark or use spark plugs to ignite the fuel and make the engine run.
Diesel engines can run on a variety of different fuels other than just traditional diesel fuel, which also includes certain types of vegetable oil, jet fuel and even biodiesel.
Biodiesel is a common alternative fuel to traditional diesel fuel for diesel engines which is made from vegetable oils, algae or animal fats and it blends well with traditional diesel fuel.
A diesel engine can also run on peanut oil and in fact early diesel engines were actually designed to be able to run on peanut oil.
Older diesel engines do better and run better on peanut oil and other vegetable oils than newer diesel engines do.
And while newer diesel engines can also run on peanut oil and other vegetable oils it's not recommended in newer and more modern diesel engines for long term use.
Rudolf Diesel who invented the diesel engine actually used peanut oil in his original diesel engine design.
Vegetable oil will run in a diesel engine.
Older model diesel engines run better on vegetable oil than newer diesel engines but even newer diesel engines can and will run on diesel engines but you may need to modify some diesel engines to properly run on the vegetable oil.
Although you can use straight vegetable oil to run a diesel engine it's best to use biodiesel which is vegetable oil that has been modified to improve it's performance and compatibility when used in diesel engines.
Straight vegetable oil is thicker than diesel and can congeal in cold temperatures, so you may often need heating elements in the fuel tank and fuel lines to ensure proper flow.
And some diesel engines may require some modifications to the fuel system to handle the different properties of the vegetable oil.
And straight vegetable oil can also contain impurities so a filter system is also recommended to prevent clogging of the injectors and fuel lines.
Straight vegetable oil is also more viscous than diesel and can lead to engine problems if it's not heating and filtered properly.
And starting a diesel engine on straight vegetable oil in cold temperatures can be difficult so you would be best to have a separate fuel tank for the vegetable oil and your normal diesel and use the diesel to get the engine warmed up and started and then switch to the tank with the vegetable oil.
Straight vegetable oil also has poor combustion characteristics so it can lead to carbon buildup in your diesel engine.
And straight vegetable oil can also produce more emissions than conventional diesel fuel which could cause a fail in an emission test.
While you can run straight vegetable oil in diesel engines it's not recommended for long term use unless modifications are done to the engine.
Biodiesel is a better option when you want to run vegetable oil in a diesel engine and especially for long term use.