keepcalculator

06 Numbers and Powers

Enable Spawn Protection on a Don’t Starve Together Server

Card No. 06·31184 · Updated · Standard formula, shown below

This guide explains how to enable spawn protection on your Don’t Starve Together (DST) dedicated server. Spawn protection prevents other players (or mobs) from destroying structures and terrain near the world spawn point, which is useful for keeping a central base safe from griefing or accidental damage. You’ll need access to your server’s configuration files, either through a hosting panel or directly on the machine running the server.

What You’ll Need

  • Access to your DST server’s settings.ini file (usually in the DoNotStarveTogether folder).
  • If using a dedicated server, the ability to edit files via FTP, a file manager in your hosting panel, or a text editor on the server machine.
  • A way to restart the server after changes (e.g., through the hosting panel or command line).

Step-by-Step

  1. Locate the server configuration file. For a dedicated server, the file is typically named settings.ini and is located inside the world folder (e.g., DoNotStarveTogether/Cluster_1/Master/ for the overworld). If you use a hosting service, use their file manager to find it.
  2. Open settings.ini with a plain text editor. Do not use rich text editors like Word; use Notepad, Visual Studio Code, or similar.
  3. Find the [NETWORK] section. Scroll through the file until you see a line starting with [NETWORK]. If it doesn’t exist, you can add it at the end of the file.
  4. Add or modify the spawn_protection setting. Under [NETWORK], add the line spawn_protection = true (or change the existing value from false to true). This enables the default protection radius of 5 tiles around the spawn point.
  5. Optionally, adjust the protection radius. Add another line spawn_protection_radius = 10 (replace 10 with any number between 1 and 20). This controls how many tiles from the spawn point are protected. If you don’t set it, the default is 5.
  6. Save the file. Ensure you save it with the same name and encoding (usually UTF-8).
  7. Restart the server. For the changes to take effect, restart the DST server. Use your hosting panel’s restart button, or if you run it manually, stop and start the process.
  8. Verify the protection. After restarting, log into the game and try to hammer a structure near the spawn point. If protection is active, you’ll see a message like “This structure is protected” and you won’t be able to damage it.

Common Mistakes

  • Editing the wrong file. Make sure you’re editing settings.ini in the Master folder (for the overworld) or Caves folder (for caves). Editing the cluster-level file won’t work.
  • Using the wrong syntax. The setting must be exactly spawn_protection = true (lowercase, with spaces around the equals sign). Typos or capital letters can cause it to be ignored.
  • Placing the setting in the wrong section. It must be under [NETWORK], not under [GAMEPLAY] or any other section. If you add it at the end without a section header, it may not be read.
  • Forgetting to restart. Changes to settings.ini are only applied when the server starts. If you don’t restart, nothing changes.
  • Setting the radius too high. A radius above 20 is not allowed and may cause errors. Stick to 1-20.

Tips

  • Use a small radius for a base. If you want to protect just a small area around spawn, set the radius to 5 or less. For a larger community base, you might want 10-15, but remember that large protected areas can be annoying if you need to build near spawn later.
  • Combine with other settings. Spawn protection works well with pvp = false to prevent griefing on co-op servers.
  • Test with a friend. Have a non-admin player try to break something to confirm the protection is working for everyone, not just admins.
  • Backup your settings. Before editing, copy the original settings.ini so you can revert if something goes wrong.

Troubleshooting

Protection not working after restart?

  • Double-check the file path and the exact spelling of the setting. Also, confirm that the server is reading the correct settings.ini (if you have multiple clusters, you might be editing the wrong one).
  • Check the server log for errors. Look for lines mentioning spawn_protection or settings.ini to see if the file was parsed correctly.

Players can still destroy things with fire or by spawning mobs?

  • Spawn protection only prevents direct player actions like hammering or using tools. It does not prevent fire spread or mob attacks. Consider using fire_damage = false or other world settings to mitigate those.

Protection radius seems larger than expected?

  • The radius is measured in tiles from the spawn point, but the protected area is a square (not a circle) around that point. So a radius of 5 protects a 10×10 area. This is normal.

Can’t find the [NETWORK] section?

  • If the file is mostly empty, your server might be using a different configuration method (like command-line arguments). In that case, add the [NETWORK] section at the top of the file and then add the setting.

Frequently Asked Questions

Does spawn protection affect mobs? No, it only prevents players from damaging structures and terrain. Mobs can still attack and destroy things inside the protected area.

Can I protect multiple areas? No, the setting only protects the area around the world spawn point. To protect other areas, you would need to use mods or manually set the spawn point elsewhere.

Does this work on dedicated servers only? Yes, this setting is for dedicated servers. If you host a game from the client (non-dedicated), you can use the in-game console command c_spawnprotection(true) instead.

Will this prevent me from building near spawn? No, you can still build, but you (and other players) won’t be able to hammer or deconstruct structures within the protected radius. If you need to remove something, you’ll have to use console commands or temporarily disable protection.

How do I disable spawn protection later? Simply set spawn_protection = false in settings.ini and restart the server.

Is there a way to protect the caves too? Yes, you need to edit the settings.ini in the Caves folder (or the corresponding world folder) and set the same values there.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →