To build a working redstone gate, place two rows of blocks as gateposts, run redstone dust from a lever or pressure plate to a sticky piston that pushes the gate blocks, and power the piston to open the gate. A basic 2-block-wide gate takes about 10-15 minutes to build and needs 6 solid blocks, 2 sticky pistons, 4 redstone dust, 1 lever, and 2 gate blocks (fence gates or iron blocks). The gate opens when powered and closes when unpowered, so test the lever before sealing the circuit.

Before You Start

Gather these materials before placing any blocks: 6 solid blocks (stone, cobblestone, or planks), 2 sticky pistons, 4-6 redstone dust, 1 lever, 2 gate blocks (fence gates, iron blocks, or wooden doors), and 1 redstone torch if you want a signal inverter. You also need a flat area at least 5 blocks wide and 3 blocks tall. Sticky pistons are essential because regular pistons will not pull the gate blocks back when power is removed.

Check that your gate blocks are pushable: fence gates, iron blocks, and most solid blocks move with pistons, but obsidian, bedrock, and blocks with inventories (chests, furnaces) do not. If you use a chest as a gate block, the piston will not move it. Place your lever on a block that is not part of the moving gate, or the lever will break when the gate moves.

Building the Gate Frame

Start by placing two gateposts. Put one solid block on the ground at each side of where you want the gate, leaving a gap of 2 blocks between them. Stack a second solid block on top of each gatepost, so each post is 2 blocks tall. These posts hold the pistons and give the gate something to slide against.

Place a sticky piston on the inner face of each gatepost at ground level, facing toward the gap. The piston faces the direction you were looking when you placed it, so stand between the posts and place each piston on the block in front of you. Both pistons should face each other across the 2-block gap. When powered, the pistons extend and push the gate blocks into the gap; when unpowered, they retract and pull the gate blocks back.

Place your two gate blocks directly in front of the piston faces, filling the 2-block gap. Fence gates work well because they look like a gate and are pushable. Iron blocks also work and look like a solid metal gate. The gate blocks sit on the ground between the pistons and move horizontally when the pistons extend.

Wiring the Redstone

Run redstone dust from a lever to both pistons. Place the lever on a solid block behind one gatepost, then run redstone dust along the ground from that block to the back of each piston. Redstone dust powers pistons when it is adjacent to them or when it runs into the block the piston sits on. If the pistons are 2 blocks apart, run dust in an L-shape: one line from the lever to the first piston, then a branch to the second piston. Each redstone dust connects to adjacent dust and to pistons within 1 block.

If the lever is more than 15 blocks from the pistons, the redstone signal will not reach them, because redstone dust loses power after 15 blocks. Use a redstone repeater every 15 blocks to extend the signal. Place a repeater on the dust line, facing the direction of the signal, and set its delay by right-clicking it (1-4 ticks). A repeater boosts the signal back to full strength.

Test the circuit by flipping the lever. Both pistons should extend and push the gate blocks into the gap, closing the gate. Flip the lever back and the pistons should retract, pulling the gate blocks back and opening the passage. If only one piston moves, check that redstone dust reaches both pistons and that no block is blocking the dust line.

Opening and Closing Logic

A lever gives you manual control: flip it to open or close the gate. For automatic gates, replace the lever with pressure plates on both sides of the gate. Place a stone pressure plate on the ground 1 block in front of each gatepost, then run redstone dust from each plate to the pistons. When you step on a plate, the pistons extend and close the gate; when you step off, the gate opens. Use wooden pressure plates for items or stone plates for players and mobs.

If you want the gate to stay closed by default and open only when powered, invert the signal with a redstone torch. Place a redstone torch on the side of a block that receives the lever signal, then run dust from the torch to the pistons. The torch inverts the signal: when the lever is off, the torch is on and the gate is closed; when the lever is on, the torch turns off and the gate opens. This is useful for gates that should block passage until a button is pressed.

2-Block Gate

Here is a full build for a 2-block-wide gate that opens with a lever. You need 6 stone blocks, 2 sticky pistons, 4 redstone dust, 1 lever, and 2 fence gates. Place two stone blocks side by side with a 2-block gap between them, then stack a second stone block on each. Place a sticky piston on the inner face of each post at ground level, facing the gap. Place a fence gate in front of each piston. Place a lever on the back of one post, then run redstone dust from the lever block to the back of the first piston, and branch a line to the second piston. Flip the lever: both pistons extend, pushing the fence gates into the gap. Flip it back: the pistons retract and the gates open. Total build time is about 10 minutes.

For a 3-block-wide gate, use 3 sticky pistons and 3 gate blocks, and run redstone dust to all three pistons. The signal still reaches all pistons if they are within 15 blocks of the lever. For a gate wider than 12 blocks, split the gate into sections with separate pistons and repeaters, because a single piston can only push up to 12 blocks.

Fixing Common Gate Problems

If the gate does not move, check that the pistons are sticky pistons and that the gate blocks are pushable. If the gate moves only halfway, a block is obstructing the piston path; remove any block in front of the piston face. If the redstone signal does not reach the pistons, add a repeater every 15 blocks. If the gate blocks fall when the pistons retract, the gate blocks are not attached to the pistons; place them directly against the piston faces. If the lever breaks when the gate moves, move the lever to a block that is not part of the moving gate.

For a gate that opens automatically for players but stays closed for mobs, use a wooden pressure plate and connect it to a redstone comparator set to subtract mode, so only players trigger the gate. Test the gate with a mob or a player before sealing the area. If the gate is in a doorway, leave at least 1 block of clearance above the gate blocks so they can slide freely.