Hello. I'm developing a game with online multiplayer support and I want to have at least one dedicated server so random people can join and play with eachother.
Is there any online service to do the hosting that can be used for free?
While I can’t point you to any such services I can offer you advice: Do not use such services until you’ve gotten multiple recommendations from people whose expertise you know to be reliable. I once lost around 30 hours of (very boring) work because I trusted in such a free service. I didn’t keep the backup when moving PCs and only was informed years later that an online tool I was offering was gone.
If you want your players to have reliable service (that doesn’t potentially sell any of their data elsewhere) you might want to look into renting some server space.
You could have a separate online version of your game with a price tag to pay for those costs. And when you can foresee when you would have to shut down the online service, you could inform the players beforehand to give them an opportunity to keep the servers running with more donations. (Unlike the “AAA”-studios who only inform their playerbase when they already decided to shut the servers down. Looking at you, Ubisoft!)