I have basically completed an online multi-player game using Nakama & Godot so my next question is what’s the best way to put my server up online (and be running effectively 24/7) instead of running it locally?
I haven’t really done server or backend work before (which is why Nakama has been a godsend) so I’m not sure how much I have to do (and I haven’t done a lot with Linux) but my original idea was to rent a linux VPS and follow the same Nakama set-up steps there (without the Windows workarounds) then start the server and call it a day. My assumption is that would come with an IP I could code into the client to connect.
The other thing I thought was something like AWS but I feel I’d be getting way more features than I need for effectively an experiment. Again, in my head I get some sort of IP or URL to connect in the Godot client code but I don’t know if that’s exactly how it works.
Am I on the right track?
Edit: I should mention I’m using the Docker method explained in this video: Getting Started with Godot and Nakama for Online Mutiplayer Games - YouTube
@Shikadi Based on the requirements you’ve mentioned I think the best option if you’re interested to manage parts of the infrastructure yourself is to look at our Digital Ocean guide. You’ll want to add a couple of steps to that workflow though:
- Set up a load balancer so that you can provide it a DNS record rather than embed the IP address of the server into your game clients (not recommended at all). You’ll need to buy a domain for that but they’re around $10-12 per year.
- Buy an SSL certificate for your domain or use LetsEncrypt certificates which are free but are only valid for 3 months at a time IIRC.
- Use the Digital Ocean managed Postgres option rather than run the database on the same droplet instance as the game server. You’ll need to configure the Nakama server to connect with the right credentials to that instance in the droplet.
We’ve got a managed service which handles all the above and lots more like metrics, logs aggregation, reachability checks, uptime alerts, continuous deployment build tools, etc, etc. but it may be too early for you to consider that for your project. Depends on the infrastructure/cloud budget you’d set aside for your server-based game.
Hope this helps.
To avoid using IP in my game, I’ve made an A type record subdomain for the domain I already had for my game project on CloudFlare, that way I also get SSL for free, analytics and even protection from attacks.
Also, if your .com is older than 60 days, you can transfer it to CloudFlare and you’ll be able to renew it for cheaper when it expires.