I'm not sure of exactly what you need but a few years ago I toyed with my own OSM server. There was a tuto on a site named linuxbabe to install everything on Ubuntu.
FWIW I generated all the tiles up to zoom 18 for France (which is the best mapped country as far as OSM go), it represented about 300 GB of data.
You will need a big SSD, 16 GB ram for a big country, 32 GB for Europe, I think you can do the world with 64 GB but ofc more is always better.
Count a few weeks to generate everything, probably less if you have a very good computer / server (mine was quite old, 2012ish I think).
FWIW I generated all the tiles up to zoom 18 for France (which is the best mapped country as far as OSM go), it represented about 300 GB of data.
You will need a big SSD, 16 GB ram for a big country, 32 GB for Europe, I think you can do the world with 64 GB but ofc more is always better. Count a few weeks to generate everything, probably less if you have a very good computer / server (mine was quite old, 2012ish I think).