How to Protect Your Farm from Raids
Mini-farming, concentric walls, Spud Gun turrets and the wiring to glue them together.
Why this is the most asked question
The farming and raids page explains the system. This guide turns that knowledge into a step-by-step build you can finish in one sitting. By the end you will have a farm that survives every raid tier, on any difficulty, in any biome.
The four-step plan
- Plant with mini-farming. Place single Soil Bags at least 64 blocks apart. This keeps each crop in its own grid cell, so Farmbots will not detect your farm regardless of how many you plant.
- Build a wooden outer wall. 3 blocks tall, surrounding your plot with a 1-block margin. Wood is intentional: it absorbs Haybot projectile damage and slows them down.
- Build a metal inner wall. 4 blocks inside the outer wall, 3 blocks tall, with murder holes every 6 blocks. This is your real defence.
- Add four Spud Gun turrets. One at each cardinal direction, mounted on 3-block tall pillars, wired to motion sensors at the wall base.
That is the entire plan. Most players finish the build in 45 minutes once they know the layout.
What the turrets need
Each turret pillar uses 1 bearing, 1 Spud Gun, 1 Battery and 1 motion sensor. The wiring is the same as the pattern in controllers and sensors. The turret spins slowly when no enemy is detected, then locks on and fires when a bot enters the outer wall.
What changes per biome
- Plains: add a moat. Haybots path poorly through water.
- Desert: use metal walls for the outer layer instead of wood.
- Forest: add ceiling tiles to the inner wall. Haybots drop hay bales from above.
- Underground: add a ceiling to layer 1. Cablebots bypass walls by dropping from above.
For the full biome-by-biome breakdown, see the defensive base layout guide.
When to upgrade to automated harvesting
Once your walls and turrets are stable, add a Craftbot chain to automate planting, watering and harvesting. The community pattern is:
- A Conveyor belt that drops Water Buckets onto crops at timed intervals.
- A Raycast sensor that triggers a Cook Bot to process harvested crops.
- A Timer sensor that starts the cycle every in-game day.
This turns your farm into a passive food source, freeing you to focus on underground mining and warehouse clears.
Common farm protection mistakes
- Planting too many crops too quickly. Trigger a raid before your walls are ready.
- Using plastic walls. Plastic is light but Haybots break it in two hits.
- Skipping the turrets. They are the difference between a raid you survive and a raid you lose.
Frequently Asked Questions
Quick answers to the most common questions.
How long does it take to build the farm?
About 45 minutes if you have the materials. The walls take 20 minutes, the turrets take 15, and the wiring takes 10.
What if I do not have Spud Guns yet?
Use Connads as a substitute. They are craftable from any Cook Bot recipe and deal area damage to Haybots.
Do I need to be online to defend the farm?
No. Once the turrets are wired, they defend automatically. The 1.0 patch improved the AI behaviour so bots path correctly even when you are offline.