
Configuring Blood Moons on Your 7DtD Server
Blood moon frequency and horde size live inside the Sandbox Code. Here is how to change them, and what to tune on the server side when horde night lags.
What Is a Blood Moon?
A blood moon (also called horde night) is a periodic event where a large wave of zombies spawns and attacks the nearest player. They know where players are, they path towards them, and they destroy blocks in the way.
Blood moons are the central challenge of 7 Days to Die. Surviving one takes preparation: a fortified base, weapons, ammo and food.
On default settings a blood moon lands every seventh in-game day, with the first on day 7.
Blood Moon Settings Are Inside the Sandbox Code
There is no BloodMoonFrequency setting, no BloodMoonRange and no BloodMoonEnemyCount in your server's settings. Those are among the options encoded in the single Sandbox Code string.
To change them: open Settings, World category, and set "Sandbox Code". It is a text field you paste a code into. Then restart the server - the code is only read at startup.
To build a code with the blood moon settings you want, start a single-player game, open Sandbox Options, set frequency, range and enemy count there, and copy the code the game gives you. Paste that into the field.
The named difficulty presets each carry their own blood moon values. The codes are listed in SandboxCode System Guide; a blank field means Nomad, which is every option at its default.
You cannot change only the blood moon part of a code by hand. The string is one encoded blob - regenerate it in game and paste the new one.
The Server-Side Setting That Does Cap the Horde
Max Spawned Zombies (Settings, Performance category) is a real, separate setting, and it is the one that actually protects your server during horde night.
Default 64, range 0-500. It is a server-wide ceiling on how many zombies exist at once, whatever the Sandbox Code asks for.
If your server lags during blood moons, lower this first. Save it, then restart the server - Max Spawned Zombies is not marked restart-required, so the panel will not restart for you and the game only reads the value at startup.
Be aware of the interaction: if the cap is already lower than the horde the code wants to spawn, the horde is trimmed to fit. A very low cap makes blood moons feel thin even on a hard preset.
Max Spawned Animals (Performance, default 50, range 0-200) works the same way for wildlife and is worth lowering on a busy server too.
Performance Considerations
Blood moons are the most CPU-intensive thing 7 Days to Die does. The server pathfinds for many zombies at once, processes block damage and resolves combat, and its main loop is single-threaded.
Lower Max Spawned Zombies first - it is the single most effective change. Save it, then restart the server yourself: the panel does not restart for this setting, and the game only reads it at startup.
Lower Max Allowed View Distance (Performance, default 12, range 4-20). Fewer loaded chunks per player means less to simulate during the horde.
Dynamic Mesh settings (Performance) matter here too. Dynamic Mesh Land Claim Only defaults to on, which keeps the expensive mesh work inside player claims rather than across the whole map. Leave it on unless you have a reason not to.
If lag persists, reduce the zombie count in the Sandbox Code itself rather than only capping it - a horde that is capped is still being asked for.
Blood Moons Are Not Happening
Check the Sandbox Code you actually have in Settings, not the one you meant to paste. A code set through a config file rather than through Settings may not have survived the last start.
A preset can set blood moon frequency to zero, which turns horde nights off entirely. If you did not build the code yourself, that is the first thing to suspect.
Confirm the setting was applied by restarting - Sandbox Code is only read when the game starts.
Max Spawned Zombies set very low will make a horde night look like it did not happen. Check it is not down at single digits.
