I plan to host more than 20 websites. Rather than paying somebody I like to buy server and host myself. I do not have much info about hosting and servers.
Don't do it. Get your hosting from someone else like most others do. Setting them up (properly) is far from trivial, and since you don't know anything about it, it would be a very steep learning curve.