Fixing Terraria server lag requires fine-tuning spawn rates, choosing an optimal world size, and maintaining plugin hygiene. This guide provides actionable settings, tables via your Hugo protable shortcode, and hands-on recommendations to keep your server running smoothly.
Sizing Summary
- Spawn Rates & Caps: Surface 0.5, Underground 0.3, Dungeon 0.2 with respective entity caps.
- World Size: Use Medium for 5-10 players; Large and Journey worlds demand robust hardware.
- Plugins: Audit high-impact plugins (WorldEdit, MagicStorage) and configure spawn/event throttling.
Spawn Rate Settings
Recommended Terraria Spawn Settings| Area type | Max entities | Notes | Spawn rate |
|---|
| Surface (Daytime) | 200 | Reduce daytime surface spawns to limit NPC overlap | 0.5 |
| Underground | 150 | Cap underground spawn to prevent sidebar lag | 0.3 |
| Dungeon/Corruption | 100 | Tighten spawns in high-load biomes | 0.2 |
World Size Guidance
Terraria World Size Performance Guide| Max kbps | Notes | Recommended players | Size |
|---|
| 2 | Small world for intimate gameplay | 1-4 | Small |
| 5 | Balanced world size and performance | 5-10 | Medium |
| 10 | High exploration but more lag risk | 10-20 | Large |
| 15 | Only for powerful hardware clusters | 20+ | Journey |
Plugin Hygiene
Terraria Plugin Hygiene Checklist| Impact | Plugin | Recommendation |
|---|
| High | WorldEdit | Use sparingly and schedule inactive hours |
| Medium | TShockNPC | Throttle spawn events via config |
| Low | KeepInventory | Safe for always-on use |
| Medium | EssentialsREST | Monitor API call rates |
| High | MagicStorage | Limit crafting frequency to reduce IO |
Tuning Spawn Rates and Caps
- Adjust
server side spawn rates in config.json under SpawnRateMultiplier. - Cap entities via
MaxNPCs and MaxBalloons to prevent client desync. - For event-heavy biomes (e.g., Pumpkin Moon), temporarily lower spawn multiplier.
Selecting World Size
- Small: Ideal for 1-4 players; low memory and CPU usage.
- Medium: Balanced for 5-10 players; good for public lobbies.
- Large/Journey: High exploration; only on VPS with >=8 GB RAM and SSD.
Plugin Maintenance
- Schedule weekly plugin audits: remove unused plugins, update outdated versions.
- For high-impact plugins, use cooldowns and event throttles in their config files.
- Monitor server logs for
NPC spawns, WorldSave events, and plugin errors to catch memory leaks early.
Additional Tips
- Regular Restarts: Automate restarts every 24–48 hours during off-peak.
- Backups: Offload backups to external storage to reduce I/O load.
- Profiling: Use TShock’s
/profile command to detect lag hotspots. - Network: Ensure upload bandwidth ≥1Mbps per 5 players; use
nether plugin for compression.
Save this file as content/posts/terraria-server-lag.md and drop it into your Hugo project. The protable shortcodes will render your tables automatically.