# How to Change the Difficulty on a Minecraft Server

Change Minecraft server difficulty with difficulty= in server.properties so it survives restarts. /difficulty resets on restart, hardcore is set at creation.

Updated 2026-10-03. https://gamezservers.com/guides/how-to-change-the-difficulty-on-a-minecraft-server

To change the difficulty on a Minecraft Java server, stop the server, set `difficulty=` in `server.properties` to `peaceful`, `easy`, `normal` or `hard`, and start it again. It applies to your existing world straight away, with nothing reset. An operator can also type `/difficulty hard` in game, but on a server that only lasts until the next restart, when the value in `server.properties` loads again. Hardcore is different: it is fixed when the world is created and cannot be switched on from the file.

## What you can change on an existing world

| Change | Existing world? | How |
| --- | --- | --- |
| Peaceful, easy, normal or hard | Yes | `difficulty=` in `server.properties`, then restart |
| Quick test of another difficulty | Yes, until restart | `/difficulty <level>` as an operator |
| Turn hardcore on | No, not from the file | `hardcore=true` only applies to newly created worlds |
| Turn hardcore off | No, not from the file | It is stored in the world's `level.dat` |
| Change difficulty in a hardcore world | No | Hardcore worlds are locked to hard |

![A Minecraft world at night, where the difficulty decides how dangerous the mobs are](https://gamezservers.com/games/minecraft/shot-3.jpg)

## What each difficulty does

| Difficulty | Hostile mobs | Hunger | Notes |
| --- | --- | --- | --- |
| `peaceful` | Do not spawn, and existing ones vanish | Does not drop, health regenerates | Good for pure building |
| `easy` | Spawn, deal less damage | Starving stops at 5 hearts | |
| `normal` | Spawn, normal damage | Starving stops at half a heart | The usual choice for survival groups |
| `hard` | Spawn, deal more damage | Starving can kill you | Zombies can break wooden doors |

The old numbers still work (`0` peaceful to `3` hard) and the server converts them to names, but use the names.

## Step 1: Back up first

Changing difficulty does not touch your builds, but switching to `peaceful` removes every hostile mob in loaded areas, including named ones and mob farms full of them. Make a backup first if your world has mobs you care about.

## Step 2: Stop the server

Type `stop` in the console. The server reads `server.properties` only when it starts, so editing it while the server runs does nothing until the next restart.

## Step 3: Edit server.properties

Open `server.properties` in the server's main folder and change one line:

```
difficulty=normal
```

Leave `hardcore=false` as it is unless you are creating a new world (see below). Save the file.

## Step 4: Start and check

Start the server and join. Type `/difficulty` with no value to see the current one, or press F3 and look for the local difficulty line. If the value is wrong, check for a typo: anything the server does not recognise falls back to its default.

## Why does /difficulty reset after a restart?

This is the part that confuses most people. In single player, `/difficulty` changes the world and stays. On a server, the [Minecraft wiki](https://minecraft.wiki/w/Commands/difficulty) notes that the difficulty lasts only until the server restarts, and then it is reloaded from `server.properties`.

So the command is good for a quick test, but the file is what counts. If your group wants `hard` permanently, put `difficulty=hard` in the file. Running `/difficulty hard` every evening means it silently falls back the moment the server restarts, whether that was you, a crash or a scheduled restart.

`/difficulty` needs operator permission. See [how to op someone on a Minecraft server](https://gamezservers.com/guides/how-to-op-someone-on-a-minecraft-server).

## Can I turn an existing world into hardcore?

Not from `server.properties`. The `hardcore` key only decides whether *newly created* worlds are hardcore. The flag itself lives in the world's `level.dat`, so flipping the line on a world that already exists does nothing. Two ways around it:

1. **Start a new world** with `hardcore=true` set before it generates. Change `level-name=` to a new folder name, or move the old world folder out, then start the server. This is the clean way, covered in [how to make a Minecraft hardcore server](https://gamezservers.com/guides/how-to-make-a-minecraft-hardcore-server).
2. **Edit `level.dat`** with an NBT editor such as NBTExplorer: stop the server, download `world/level.dat`, set the `hardcore` byte under `Data` to `1` (or `0` to turn it off), and upload it again. Keep a backup, because a broken `level.dat` stops the world loading.

In a hardcore world the difficulty is locked to hard, players who die become spectators, and `/difficulty` does nothing.

## Common problems

- **Difficulty goes back after a restart:** you only used `/difficulty`. Put the value in `server.properties`.
- **The file change did nothing:** the server was running when you edited it, or the line has a typo like `difficulty=Hard ` with a trailing space. Stop, fix, start.
- **Hardcore=true but players still respawn:** the world was created before you set it. Hardcore only applies to new worlds unless you edit `level.dat`.
- **Can't change difficulty at all:** the world is hardcore, or you are not an operator.
- **Mob farm stopped working:** the server is on `peaceful`, where hostile mobs do not spawn.

## Changing the difficulty on GamezServers

On a [GamezServers Minecraft server](https://gamezservers.com/games/minecraft), press **Stop**, open `server.properties` in the **Files** tab, change `difficulty=` and press **Start**. The panel only manages the port and the server list message in that file, so your difficulty stays exactly as you set it. Make yourself an operator from the dashboard with **Make operator** to use `/difficulty` in game, and take a one click **Backup** before switching to peaceful. Every other key is in [Minecraft server.properties explained](https://gamezservers.com/guides/minecraft-server-properties-explained).

## FAQ

### How do I change the difficulty on my Minecraft server permanently?

Set `difficulty=` in `server.properties` with the server stopped, then start it. The `/difficulty` command resets on the next restart.

### Does changing difficulty reset my Minecraft world?

No. It applies to the existing world on the next start, and your builds and inventories stay. Peaceful does remove hostile mobs.

### Can I turn hardcore off on a Minecraft server?

Not with `server.properties`. Hardcore is stored in the world's `level.dat`, so you need an NBT editor to change it, or a new world.

### Why can't I use /difficulty on my server?

You need to be an operator, and the command does nothing in a hardcore world, which is locked to hard.
