Programming knowledge is largely irrelevant, as in to gain sensible benefits from it you have to be generalist software engineer with decade+ of experience of seeing it all. Then yeah, you can read any code, any stack traces and figure out the intent of developers of the system and what is undocumented/incorrectly documented.
Focusing on one particular language is the right and wrong answer at the same time. Wrong in a sense that you’ll have to pick up other languages along your journey anyway and right because you need to achieve mastery in one of them to get to more advanced programming topics. Pick a language that you have fun using and don’t care about anything else.
As for what to learn for self-hosting… Linux (pick a distro, let’s say ubuntu LTS w/o gui, ssh there and get comfortable with it. It includes installation, filesystems, RAID setups), networking, HTTP/S (that’s the main thing you’ll be interacting with as self-hoster and knowing various nuances of reverse proxying is a must), firewalling, basics of security and hardening, docker, monitoring, backups.
yes, now I’m paying 10 times more.
Don’t mind it though, experience is better in every way possible besides occasional maintenance need, but it’s definitely not for everyone. Could be done cheaper, but it’s tradeoffs all the way as with everything in life.