It was soon clear that the Bolsheviks had gained a lot from their victories in the july days and the Kornilov affair. By the middle of seotember they had gained a majority in both the petrograp and Moscow soviets. It was a reflection of the changing character of the soviets. The Petrograd soviet began to shift to the left while the provisional govt began to shift to the right. Lenin put it at a stark choice, either soviet government or kornilovism, there is no middle course.
From his exile in finland, lenin constantly appealed to his party to prepare for an overthrow of the provisional govt. he said the provisional govt was incapable of solving the land and war issues and was becoming reactionary. He was convinced that the Bolsheviks would have to take power before the meeting of the all-Russian soviet and the election for the constituent assembly. The elections would be tricky for them Bolsheviks as all progressives and reformers had set their hopes on it. Once it existed, it would be hard to control. And so they had to be in control before that so they could undermine them if they lost.
On the 7th of October, Lenin decided to slip quietly back into Petrograd. His presence alone was a great encouragement for the Bolsheviks, but not everybody was united.
Rumors of an imminent coup by the Bolsheviks began to circulate. Zinoviev and Kamenev argued that it would be a mistake to attempt an overthrow currently. Kerensky took this to be an indication that a date had already been set. On the 23rd October the Bolshevik newspapers were closed down by the government troops, Lenin seemingly with no other choice ordered the Bolshevik insurrection to begin.
Leon Trotsky played a key role in planning. While Lenin was a great influencer it was usually left to Trotsky to organize events. On 9th October they set up the MRC- Military Revolutionary committee to defend Petrograd against a German attack or another Kornilov type assault from within the country.