I know if you type the command
/gamerule keepInventory true as an Operator, when you die, the items will keep in your inventory. How can I do this in game server properties? For example, in the
server.properties file in a survival mode server I own.
Game Rule data is stored as part of the underlying world data, rather than loading from the server.properties file. Therefore, the only way to change Game Rules is through running the
/gamerule command while in-game. Fortunately, they do persist with the world, so you only need to run them once.
I want to answer the part about editing Game Rules from outside the Minecraft client. You can easily use something like NBTExplorer to edit the Game Rules (and other "world only data") from outside the minecraft client.
This can be useful when the server is closed but you still need to edit the world data.