I am doing that. I am part of a research group, and don’t have the $$ or ability to pay so much for all these services.
So we got a $90k server with 184TB of raw storage (SAS SSD), 64 cores, and 1TB of memory. Put it on a 10GB line at our university and it is rock solid. We probably have less downtime than Github, even with reboots every few months.
Have some large (multi-TB) databases on it and web APIs for accessing the data. Would be hugely expensive in the cloud with, especially with egress costs.
You have to be comfortable sys-admining though. Fortunately I am.