# How to Configure Water and Electricity Shutoff on Your Project Zomboid Server (/docs/project-zomboid/water-electricity)



In Project Zomboid, water and electricity eventually shut off as part of the apocalypse simulation. You can control when (or if) this happens on your server.

Shutoff Settings [#shutoff-settings]

Edit `Zomboid/Server/[servername]_SandboxVars.lua`:

| Setting             | Default | Description                                      |
| ------------------- | ------- | ------------------------------------------------ |
| `WaterShut`         | 2       | When water shuts off                             |
| `ElecShut`          | 2       | When electricity shuts off                       |
| `WaterShutModifier` | -1      | Exact day for shutoff (-1 = random within range) |
| `ElecShutModifier`  | -1      | Exact day for shutoff (-1 = random within range) |

Shutoff Scale [#shutoff-scale]

| Value | Meaning                |
| ----- | ---------------------- |
| 0     | Instant (off at start) |
| 1     | 0–30 days              |
| 2     | 0–2 months             |
| 3     | 0–6 months             |
| 4     | 0–1 year               |
| 5     | 0–5 years              |
| 6     | Never (always on)      |

Never Shut Off Utilities [#never-shut-off-utilities]

For a more casual experience:

```lua title="SandboxVars.lua"
WaterShut = 6,
ElecShut = 6,
```

Set an Exact Shutoff Day [#set-an-exact-shutoff-day]

Use the modifier settings to set a specific day:

```lua title="SandboxVars.lua"
WaterShut = 2,
WaterShutModifier = 30,
ElecShut = 2,
ElecShutModifier = 14,
```

This shuts off electricity on day 14 and water on day 30.

Generator Settings [#generator-settings]

After electricity shuts off, players can use generators. Related settings:

| Setting                    | Default | Description                                               |
| -------------------------- | ------- | --------------------------------------------------------- |
| `GeneratorSpawning`        | 3       | How often generators spawn (1=Extremely Rare, 5=Abundant) |
| `GeneratorFuelConsumption` | 1.0     | Fuel consumption rate (lower = lasts longer)              |

Easy Generators [#easy-generators]

```lua
GeneratorSpawning = 5,
GeneratorFuelConsumption = 0.5,
```

Scarce Generators [#scarce-generators]

```lua
GeneratorSpawning = 1,
GeneratorFuelConsumption = 2.0,
```

Recommended Presets [#recommended-presets]

Casual (Never Lose Utilities) [#casual-never-lose-utilities]

```lua
WaterShut = 6,
ElecShut = 6,
```

Balanced (Lose Utilities After ~1 Month) [#balanced-lose-utilities-after-1-month]

```lua
WaterShut = 2,
WaterShutModifier = 45,
ElecShut = 2,
ElecShutModifier = 30,
GeneratorSpawning = 3,
```

Hardcore (Lose Utilities Quickly) [#hardcore-lose-utilities-quickly]

```lua
WaterShut = 1,
WaterShutModifier = 7,
ElecShut = 1,
ElecShutModifier = 3,
GeneratorSpawning = 1,
GeneratorFuelConsumption = 2.0,
```

Related Guides [#related-guides]

See also: [Sandbox Settings](/docs/project-zomboid/sandbox-settings) | [Configure Your Server](/docs/project-zomboid/server-config)

If you need help, join our [Discord](https://discord.xgamingserver.com/).
