How to setup a server for storing data for a unity game?

I have only seen documentation for how to use unity to access a already created server, but what I would like to know is how you actually create a server.

The server would be for hosting data, such a player’s highscore, personal inventory, and other stuff that if the person uninstall’s the game won’t be deleted.

I know steam has a way of storing an inventory for your game, should I just go with that once It gets on steam?

This is a very broad topic, and it’s not the best to put it here, but I’ll give you some ideas. I’m not much of an expert, but I’m sure it’s a good starting place.

If your game is going to be multiplayer, and/or you are sure you want to save the data on a server (such as having a Leaderboard including other players), then you will need a server. However, if you’re only wanting a leaderboard for the local player only, then there’s no need for a server, as you know. Now, as far as deleting information, as far as I believe, using PlayerPrefs to store information is most likely stored in the “_Data” folder alongside your executable on windows builds. However, if you’d still want to store it into a local folder, such as AppData. Check out this tutorial video by Quill18Creates. You may need to skip around, but at about 23:00, he starts talking about how to store a file in AppData.

As far as a server, I can only give you some ideas. You’d need to set up either a MySQL database (something separate from Unity), or use Steam’s API to store data on their servers, as you suggested at the end. I know that both options are possible. However, you will have to use Steam’s straight C (++?) API and incorporate it to work with Unity. There are some assets on the store to do this for you (or at least simplify the process), but again, it can greatly help you out if you’re going to release your game on Steam. However, you’ll have to note that you’ll need to actually publish your game to Steam, which has many steps in between.

Good luck, let me know if you need any more explaining.