dobi was born from a poor family, he was born in szony. in his childhood, he worked as a day labourer. in 1916 came into contact with the agricultural workers' movement. after having fought in the first world war, he supported the hungarian soviet republic. during the hungarian–romanian war of 1919 he was captured by the romanians.