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.