The groundnuts or peanuts are originally South American, were they were grown by Indian communities. It was introduced to West-Africa (first the Senegambia area) by the Portuguese in the 16th century. Here it spread quickly, though faster in the interior of Africa than along the coast.
Cultivation on a larger scale began before 1830 in Senegambia, mostly as insurance against failure of the millet harvest, because of it's resistance to drought. The first small exports from Senegambia to Europe were reported from the year 1830. There fallowed a boom in exports when the potentials for peanut oil was realized. I industrializing Europe there now was an ever-growing demand for lubricating oils. Further, oils were needed in the production of soap, as there at the same time was massive campaigning for new standards of hygiene. And of course, vegetable oils were needed for cooking.