Of course, you can undertake your IAS preparations from the comforts of your home. As a matter of fact, most aspirants carry on with their IAS preparations from the coziness of their homes.
Let me tell you, if you have the right IAS preparation strategy, the right books, and the right materials from the right online sources, you can easily prepare for the IAS exams and succeed without once stepping out of the confines of your home.
And, along with a good IAS preparation strategy and all of the aforementioned you’d also need to work hard, be dedicated, and be extremely motivated to carry on with your studies.
However, I’d also add here, that taking help from online coaching agencies, at least as far as their Mock test series or current affairs modules go, is not a bad idea. They help cut down preparation time by a whole lot.