Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

Enable Griefer Spawn Protection by setting spawnprotection = "always" in the server shard’s worldgenoverride.lua, then restart the shard and test with a newly spawned player. On a dedicated server, the file normally belongs in the cluster’s Master directory, with a matching override in Caves if you want the underground shard covered as well.

What Griefer Spawn Protection does

Don’t Starve Together names this setting Griefer Spawn Protection. When it is enabled, a newly spawned player receives temporary spawn protection: that player can walk through structures, and creatures or other players cannot target the protected player. The documented behavior concerns a player who has just spawned, so verify it with a fresh spawn rather than with someone who was already connected.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The configuration key is spawnprotection. It accepts three values:

Value Protection level Meaning
never None Disables the protection behavior.
default Automatic Delegates the choice to the game’s automatic behavior. Klei notes that the default for this option depends on the platform.
always Always Enables Griefer Spawn Protection for newly spawned players.

For a dedicated server, this is a world-generation override rather than a live administrative command. The setting is read from the shard configuration when that shard starts. A clean restart is therefore part of applying the change.

#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter | 4Pack Type C Female to A Male Cable Converter for Apple Duo 17 16 15 14 Plus,iWatch Watch 12 11 10,iPad 9 8 Air,Airpods 5 4
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Choose the right deployment method

Dedicated server cluster

Use a file-based override when you run the server yourself or use DST dedicated server hosting that exposes the cluster files. A cluster normally has a Master shard for the surface world and may also have a Caves shard for the underground world. Each shard can have its own worldgenoverride.lua.

Hosted or locally created world

If you create a world through the game’s world-creation interface, use the world customization option for Griefer Spawn Protection before generating the world. The exact in-game labels can vary by platform, and Klei’s documentation states that the automatic default depends on the platform. The file procedure in this guide is for a dedicated cluster; do not assume that editing a dedicated-server file will rewrite the settings screen for an already generated hosted world.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Before editing the server

  • Stop the affected shard or stop the complete cluster if your control panel manages all shards together. Do not edit a file while the server is actively writing it.
  • Back up the entire cluster directory, including the world save, configuration files and both shard folders if present. Keep the backup outside the live cluster so a restart cannot overwrite it.
  • Confirm which cluster you are changing. The examples below use Cluster_1, but your installation may use another name.
  • Use a plain-text editor. A rich-text editor can insert formatting characters that make Lua invalid.
  • Check whether the shard already has a worldgenoverride.lua. If it does, preserve its existing settings instead of replacing the whole file.

Find the shard’s worldgenoverride.lua

Klei documents the default configuration roots as ~/.klei on Linux and Documents/Klei on Windows and macOS, with DoNotStarveTogether as the default configuration directory. The full paths below show the usual layout:

Operating system Master shard path Notes
Linux ~/.klei/DoNotStarveTogether/Cluster_1/Master/worldgenoverride.lua Replace Cluster_1 with the actual cluster directory.
Windows %USERPROFILE%/Documents/Klei/DoNotStarveTogether/Cluster_1/Master/worldgenoverride.lua Use the Windows user profile that owns the server configuration.
macOS ~/Documents/Klei/DoNotStarveTogether/Cluster_1/Master/worldgenoverride.lua Use the macOS home folder for the account running the server.

The folder names are case-sensitive on systems such as Linux. If your host relocates the configuration directory, follow the path shown by that host’s startup command or control panel, then locate the cluster’s Master folder inside the DoNotStarveTogether configuration tree.

Enable protection in Master

  1. Stop the server or at least the Master shard. Wait for the process to exit cleanly.
  2. Open the cluster directory and then open Master.
  3. Create a file named exactly worldgenoverride.lua if it does not exist. Ensure your editor does not append .txt.
  4. For a new override file, enter this Lua table:
return {
    override_enabled = true,
    settings = {
        spawnprotection = "always",
    },
}
  1. Save the file as plain text and confirm that the filename and extension remain worldgenoverride.lua.
  2. Start the Master shard again. If your setup starts the whole cluster with one command, restart the cluster instead.
  3. Read the startup log before connecting. A Lua syntax error or an override-loading error means the file was not accepted and must be corrected before testing.

The override_enabled = true line activates the override table. The settings table contains the setting itself; the key must be spelled spawnprotection, and the value must be the quoted string "always".

Rank #2
Sale
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Add the setting to an existing override file safely

Many clusters already use worldgenoverride.lua for resource, creature or world-layout choices. Do not paste a second complete table below the first one and do not create a second settings table. Lua files should have one returned table, with one settings table containing all of the overrides.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For example, if the file already looks like this:

return {
    override_enabled = true,
    settings = {
        world_size = "medium",
        season_start = "autumn",
    },
}

Add the new key inside that existing settings table, leaving the other entries intact:

return {
    override_enabled = true,
    settings = {
        world_size = "medium",
        season_start = "autumn",
        spawnprotection = "always",
    },
}

Commas separate entries. A missing comma, an unmatched brace, a misspelled key or an unquoted value can prevent the shard from loading the override. If the existing file has override_enabled = false, change it to true so the settings table is active.

Decide whether Master, Caves or both should contain the override

Shard Put the file here When to use it
Master Cluster-name/Master/worldgenoverride.lua Use this for the surface shard. It is the normal location for a standard dedicated world.
Caves Cluster-name/Caves/worldgenoverride.lua Use this when the cluster has an underground shard and you want the corresponding override represented there too.
Both One file in each shard directory Use matching files when your cluster runs both shards and you want consistent configuration coverage.

Master and Caves are separate server processes and separate configuration locations. Editing only Master does not place a file in Caves. If your installation has no Caves directory, there is no underground shard to configure. If it does have one, stop and restart that shard after adding or changing its file.

Restart and verify the behavior

  1. Close the affected shard completely. A control-panel “restart” is sufficient only if it actually stops and starts the process.
  2. Watch the startup output for Lua parsing errors, invalid override messages or a failure to load worldgenoverride.lua. Fix those errors before inviting players back.
  3. Join with a player who newly spawns in the world. A player who was already alive before the restart is not a reliable test of spawn protection.
  4. During the protected period, check that the newly spawned character can pass through structures and that creatures or other players cannot target that character.
  5. If the cluster has Caves, perform a fresh-spawn test in the underground shard after restarting Caves as well.

Keep the backup until the test succeeds. The setting is a world-generation override, so an existing generated world should be treated cautiously; changing the file does not guarantee that the in-game world-customization display will be rewritten.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter | 85W Max PD, 2 USB 3.0 & 1 USBC Data Ports, SD/TF Card Reader, for Laptops/Mac and Other Type C Devices (Charger Not Included)
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Why spawnprotection = “always” may not take effect

The file is in the wrong directory

Check the complete path from the active cluster root through the shard folder. A file in the parent cluster directory, a different cluster such as Cluster_2, or a similarly named save folder will not configure the shard that is running. Confirm the path in the server’s startup command or hosting panel.

The filename is wrong

On Windows, File Explorer can hide known extensions, leaving a file named worldgenoverride.lua.txt. Enable visible extensions and rename it to exactly worldgenoverride.lua. On Linux and macOS, check for capitalization and accidental trailing spaces.

The override table is disabled

The file must contain override_enabled = true. If it is false, the server can start normally while ignoring the settings table.

A second settings table was added

Lua accepts one returned table in this configuration. Merge spawnprotection = "always" into the existing settings table rather than appending a second return statement or another settings block.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Lua syntax is invalid

Inspect commas, braces and quotation marks. The safest minimal structure is the four-line table shown earlier. Restore the backup, reapply the single setting, and restart while watching the log for the exact line that failed.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

The wrong shard was restarted

If you edited Caves but restarted only Master, the underground process has not read the change. Restart the shard whose directory contains the file, or restart the complete cluster when the host manages both processes as one service.

You tested with an existing player

Protection is documented for a newly spawned player. Have a test account or character spawn after the restart, then check targeting and movement. Connecting with a character who was already present does not establish whether the override loaded.

The world was already generated

Because this is a world-generation override, applying it to an established world needs a backup and a controlled test. Do not delete the save or regenerate the world merely because the customization screen still shows its old state. First confirm the active file, restart cleanly and test a fresh spawn; if the behavior remains unchanged, restore the backup before making broader world changes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The host rewrites configuration files

Some managed panels generate shard files from their own settings. If your manual edit disappears after a restart, use the panel’s file editor or configuration field, or ask the host where persistent world-generation overrides belong. The required value remains spawnprotection = "always", but the persistence mechanism is host-specific.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Changing or disabling the setting later

To let the game choose its automatic behavior, change the value to default. To disable protection explicitly, use never. Edit the same shard files, preserve the rest of each settings table, stop the affected shard, save the file and restart it. Verify the new behavior with a newly spawned player; do not infer the result from an already connected character.

Best Value
Sale
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display | 85W Max PD, 1 Powered USB-C 5Gbps & 2 Powered USB-A 3.0 5Gbps Data Ports, for MacBook Pro, MacBook Air, Dell and More (Black)
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

If you need to undo an experiment, stop the server, restore the backed-up cluster directory or the original worldgenoverride.lua, and start the server again. Restoring the complete cluster is safer than reconstructing a save from memory because it returns both world data and configuration to the known state.

Operational checklist

  • Setting name: Griefer Spawn Protection.
  • Configuration key: spawnprotection.
  • Enable value: always.
  • Disable value: never.
  • Automatic value: default.
  • Activation flag: override_enabled = true.
  • Primary location: the active cluster’s Master/worldgenoverride.lua.
  • Underground coverage: add the corresponding file under Caves when that shard exists and should carry the override.
  • Safety: stop the server and back up the cluster before editing.
  • Validation: restart the affected shard, inspect startup logs and test with a newly spawned player.

Frequently asked questions

Does the key need a capital letter?

No. Use the lowercase key spawnprotection exactly as shown. Lua setting names are not interchangeable with the human-readable label “Griefer Spawn Protection.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can I put the value outside the settings table?

No. Place it inside the returned table’s settings section. A top-level line beside settings is not the documented structure for this override.

What if my cluster uses a name other than Cluster_1?

Use the directory name that actually contains your live Master and, if present, Caves folders. Cluster_1 is only the conventional example path.

Is a server reboot enough without a fresh spawn?

A restart makes the shard reread the file, but only a newly spawned player provides the documented behavior test. Use both steps.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.