Turning on keepInventory and the other Minecraft gamerules
Last updated September 30, 2026
Start the server first, then open that server's "Settings" tab and its "Game rules" group, where the "Game rules (gamerules)" section holds "Keep inventory on death" is the keepInventory rule. Flip the switch and it takes effect in the world immediately — no restart — because the change is sent as a gamerule command to the running server over RCON. That is also why the switches only work while the server is running, and why the permission you need is "Settings" rather than "Console". Gamerule values live in the world's own level.dat file, not in our database. Ten rules in total, on every Java-edition Minecraft server except Bedrock and PUMPKIN.
- Start the server and wait for it to be running
- Open the Settings tab and its Game rules group
- Flip the switch for the rule you want
- Check it in game straight away, without restarting
On this page · 8 sections
You want players to keep their stuff when they die. The rule you are after is called keepInventory, and on a uniz.host Minecraft server you can switch it on from the web without typing a command yourself. Better than that: it takes effect immediately, with no restart — unlike the server.properties settings and your mods, which always wait for the next restart.
Turning keepInventory on, step by step
Start the server and wait for it to be running
The gamerule switches only work while the server is running. If the server is stopped, the section shows the line "Start the server to change gamerules." and every row is locked. Start it, wait until the state reads as running, then carry on.
Open the Settings tab and its Game rules group
On the server page (/dashboard/servers/<id>), pick the "Settings" tab, then the "Game rules" group. The "Game rules (gamerules)" section is the last one in the group, after the server.properties sections "Gameplay", "Players" and "World"; press "Gamerules" in the section menu at the top of the group to jump straight to it.
When the section loads it goes and asks the running world for the current value of all ten rules. For a moment before that read lands, the switches show the catalogue's starting values; they update to the real ones as soon as the read succeeds.
Flip the switch for the rule you want
For keepInventory, look for the row labelled "Keep inventory on death" and turn its switch on. There is no save button, the group's save bar does not appear, and there is nothing to confirm — each row sends its own command the instant you touch it. To go back to the catalogue's starting value, press "Reset to default" on that row.
The two numeric rows, "Players sleeping % to skip night" and "Random tick speed", behave slightly differently: the value is sent when you click out of the box rather than on every keystroke, and anything outside the allowed range is pulled back into range before it is sent.
Check it in game straight away, without restarting
Switch back to the game and test it. No leaving the server, no restart button, and nobody online gets kicked. The section's tag says as much — "Applies at once, no restart" — and that is exactly what the system does.
If a switch snaps back to where it was and a message appears, the command did not go through; it is not the page failing to refresh. The section on rules your server cannot answer covers why.
The ten rules we expose, and their starting values
This is a curated list, not every gamerule Minecraft has. The middle column is the label you actually see on the settings page.
| Rule | Label on the settings page | Control | Starting value in our list |
|---|---|---|---|
keepInventory | Keep inventory on death | switch | off |
mobGriefing | Mob griefing | switch | on |
doDaylightCycle | Daylight cycle | switch | on |
doWeatherCycle | Weather cycle | switch | on |
doMobSpawning | Mob spawning | switch | on |
doFireTick | Fire spread | switch | on |
doInsomnia | Phantoms (insomnia) | switch | on |
commandBlockOutput | Command block output | switch | on |
playersSleepingPercentage | Players sleeping % to skip night | number 0–100 | 100 |
randomTickSpeed | Random tick speed | number 0–4096 | 3 |
Read that last column precisely. It is the value the page starts by showing before it has read your world, not a promise about what your world is set to. A world that has been through someone else's hands, or through a mod that writes its own values, may sit somewhere else entirely — and the number it settles on after loading is the one that came back from your live world.
The names in the first column are the rule names the game itself uses, and they are case-sensitive.
Why gamerules apply instantly when other settings need a restart
The difference is where the value ends up.
The server.properties sections — "Gameplay", "Players" and "World" — write into the server's own configuration, which the server only reads while it boots. Those sections say so with an "Applies after a restart" tag, and while the server runs the group's save bar offers "Save and restart". Mods on the Content tab follow the same rule, and a plain "Save" while the server is running raises a banner on the server page saying the changed settings apply after the next restart, with a "Restart now" button.
Gamerules do not travel that road. Each change is sent as a gamerule <name> <value> command into the running server through RCON — the same channel the Console tab uses. We are, in effect, typing the command for you. The server receives it in that second and changes the world's rules there and then, because there is nothing left to boot.
The consequence people do not expect is the mirror image: gamerules are the one thing on the settings tab you must have the server running to change. Everything else you can edit while it is switched off.
Gamerule values are not in our database
None of these ten rules has a field in the uniz.host database. The real values live in your world's level.dat, a Minecraft file, and we keep no copy anywhere else — which is why the page asks the world afresh each time you open it.
Two consequences follow, and both are better learned here than the hard way.
One: restoring an older backup restores that backup's gamerules. A backup archives the whole server data folder, level.dat included, and a restore unpacks that archive back over the top. So a rule you switched on yesterday disappears if today you restore last week's backup to recover a broken world. Set the rules you care about again once the restore has finished.
Two: a world reset starts the gamerules fresh. Resetting the world deletes the world folders and lets the server generate new ones, which means a brand-new level.dat — so the rules come back as the server itself creates them, not as you had them in the old world. Mods, plugins and your other configuration files survive, because the reset only touches the world folders.
The permission you need is "Settings", not "Console"
This one catches people out. The mechanism underneath is a console command, but the permission the system asks for — on both the read and the write — is "Settings". We treat this as a settings surface that happens to ride on RCON, not as handing out console access.
So when you divide permissions among a team, the split works like this:
- Give someone "Settings" and they can change gamerules (along with everything else on the Settings tab).
- Give someone only "Console" and they can type commands in the Console tab, but the gamerule switches stay out of reach.
A member without "Settings" still sees the gamerules section, but every control is disabled and we never fetch the live values for them at all. What they see is the catalogue's starting values rather than the world's — so if you are asking a friend to read the current settings back to you, grant the permission first or the numbers will not be real.
Rules your server cannot answer are dropped, never guessed
Different server versions know different rules. Our list of ten is a single list used against every version, so an older server may simply not recognise one of them.
On the read side, if the server answers with a refusal, answers with nothing, or answers a numeric rule with something that is not a whole number, that rule is left out of the response rather than filled in with a default. The reasoning is blunt: showing you a value your world does not actually use is a fabricated reading, and worse than showing nothing. And if not one rule can be read, you get a clear "cannot reach the server" error instead of an empty section that would suggest your world has no rules at all.
The write side keeps the same standard. If the server refuses the command because it does not know that rule, we do not report success — the switch reverts and you get "Could not change the gamerule", because a completed connection and a completed command are two different things.
The practical hint that falls out of this design: if one row stubbornly sits at its starting value while the others move, suspect that your server version does not have that rule. The quickest check is to read the rule yourself in the Console tab and see what the server says back.
Which servers get gamerules
Every Java-edition Minecraft server type we sell: Vanilla, the Paper family (Paper, Purpur, Leaf, Folia), Spigot, Bukkit, Fabric, Quilt, Forge, NeoForge, the hybrids Mohist and Arclight, and servers installed from a modpack.
Two cases are excluded.
| Excluded | Why |
|---|---|
| Minecraft Bedrock edition | The Bedrock server software has no RCON to carry these commands, and its console runs over a different channel entirely. The section is not shown, and the API refuses the request. |
| PUMPKIN server type | It is a different lineage of server software and we have not verified the shape of its replies, so it is excluded rather than guessed at. |
Other games on uniz.host, Palworld among them, have no gamerule system of this kind — each game's own settings live in its "Game rules" group instead.
Read next
- Minecraft server — the full picture, from running one yourself to hosting it here
- Dashboard tour — where the tabs are and how to read each part
- Java runtime — when a server will not boot because the Java version does not match
- /minecraft — specs and prices for Minecraft servers
Frequently asked questions
Why are the gamerule switches marked Locked?
Because the server is not running. In any state other than running, the gamerules section shows the line "Start the server to change gamerules." and every row shows the catalogue's starting value, marked "Locked". The reason is that gamerules are not read from our database — they are read from the live server over RCON, so a stopped server has nothing to ask and nothing to command. The API takes the same position and answers with a 409 if a change arrives while the server is not running.
Do I have to restart after changing a gamerule?
No, and that is the one thing worth remembering about this section. Every flip sends a gamerule command straight to the server that is running right now, so players already in the world see the effect without leaving. That is different from the server.properties sections and the mods on the Content tab, which both save immediately but only take effect on the next restart.
What happens to my gamerules if I restore an older backup?
You get that backup's gamerules back. Gamerules live in the world's level.dat file, a backup archives the whole server data folder including that file, and restoring unpacks the whole set back over the top. So if you switched keepInventory on yesterday and then restore last week's backup because the world broke, that change goes away with it. Switch the rules you care about back on once the restore has finished.
Can a team member change gamerules, and which permission do they need?
They need the "Settings" permission, not "Console" — even though the mechanism underneath is a console command. A member without it still sees the gamerules section, but every control is disabled and we never even fetch the live values for them, so what they are looking at is the catalogue's starting values rather than what your world is actually set to. Grant the permission before asking someone to read the numbers back to you.
Why does my server have no gamerules section at all?
The section is Java-edition Minecraft only. Bedrock servers do not get it because the Bedrock server software has no RCON to send these commands over in the first place, and PUMPKIN servers do not get it either. Both exclusions are enforced in the web app and again in the API. Other games on uniz.host, such as Palworld, have no Minecraft-style gamerule system to begin with.
A switch snapped back and I got "Could not change the game rule" — what went wrong?
A switch snapping back means the command genuinely failed rather than the page being out of sync. Each control moves optimistically and reverts, with that line under the row, when the server does not accept the change. The usual causes are a server that is restarting so RCON cannot be reached, or a server version that does not know that rule. We would rather tell you it failed than show you a change that never happened.
Related guides
Would you rather skip all of this?
A server on uniz.host is up in minutes. You pay by the hour only while it is online, and the smallest top-up is ฿20.