What you’re talking about is host migration and unfortunately there is no easy way to do this . You have to code it yourself which means overriding network and session code which is a minefield and a headache. Im not saying it’s impossible as obviously other games / people have done it .
I originally had listen servers as we were making a multiplayer shooter game but as suggested here it was quickly apparen’t how easy it is for cheating and host dropping to occur.
I have since switched to dedicated servers . And now use a dedicated server manager which can start and stop servers at will so in effect players can host and join servers but if they were to drop from game the server is still online meaning game continues and dropped players can even rejoin of you want them to.
When game ends server recieves function to shut down so it is only running and using resources while the game is running . If no players then no server instances are running.
In basics the way it works is this
Player clicks umg host button
This constructs a json object using varest plugin and sends all player,server data,map name etc into a database via php script.
Then my external dedicated server manager listens for the json object and when it recieves the object it calls function to start the server.
I am currently trying to figure out network sockets . If I could find a way to open a network socket between unreal and the server manager it would be even easier and better and more secure to send data .
I cannot take credit for the system this guy helped me and had the original idea . I just tweaked it and adjusted it for my needs
System can be seen in action here . All credit to this guy
https://youtu.be/e2H09jNqJMg
Also I wouldn’t worry about costs to begin with I am hosting 5 games/server instances on my own machine just fine which is OK for testing or to begin with. Although it does depend how many players you want on each instance etc
Or if you have the money ou can buy a virtual server for around £40 a month to get you underway
And realistically you only need to expand if you’re player Base grows . And if you have a big player Base then theoretically you will or should be making enough money to support the servers