Skip to main content
Vanilla DayZ has only combination locks: a 3-dial lock (1,000 combinations) and a 4-dial lock (10,000 combinations) that you attach to a completed fence gate. You set the code while holding the lock, before you attach it. A digital code lock (keypad) is not in vanilla DayZ; it comes from mods, such as the code lock in DayZ Expansion BaseBuilding, which server owners configure in BaseBuildingSettings.json.

How to use a combination lock in DayZ

1

Find a lock

Combination locks spawn as loot in industrial and farm areas. The 4-dial lock is the safer one.
2

Set the code first

Take the lock in your hands and set your combination before you attach it. Avoid easy codes such as 000, 111 or 123.
3

Attach it to the gate

Build the fence gate completely, then attach the lock to the gate.
4

Open it with your code

To open the gate or take the lock off, dial your code on the lock.
Write the code down. If you forget it, you have to break in like anyone else.

How a digital code lock works on modded servers

A code lock mod replaces dialling with a keypad and a code you type in. With DayZ Expansion BaseBuilding the server owner controls it in BaseBuildingSettings.json: Players set and enter the code with the mod’s own keypad screen in game.

Code lock or combination lock: which should your server use?

How to add a code lock to your server

1

Install the mod

Add DayZ Expansion (BaseBuilding is part of DayZ-Expansion-Bundle) or another code lock mod. See install DayZ Expansion and install mods.
2

Start once

Start the server so the mod writes its settings to profiles/ExpansionMod/Settings/.
3

Change the settings

Stop the server, edit BaseBuildingSettings.json (for example CodelockAttachMode and CodeLockLength), save and start again.

Frequently asked questions

Is there a digital code lock in vanilla DayZ?

No. Vanilla DayZ has 3-dial and 4-dial combination locks. Keypad code locks come from mods.

Can I put a combination lock on a tent or crate?

In vanilla DayZ, combination locks go on fence gates. Some code lock mods let you lock tents too, for example with CodelockAttachMode 2 or 3 in Expansion.

How many combinations does a DayZ combination lock have?

1,000 for the 3-dial lock and 10,000 for the 4-dial lock.

Can I make locks spawn more often?

Yes. Raise nominal for CombinationLock and CombinationLock4 in types.xml. See types.xml.

DayZ server guide

Every DayZ page in one place.

Install DayZ Expansion

BaseBuilding and code locks.

types.xml loot

Change lock spawns.

Party and group mods

Play as a team.

Tested by the FREAKHOSTING team on 30 October 2026 (DayZ stable branch on our Game Panel). Lock details checked against the DayZ wiki and the Expansion BaseBuilding settings on 30 October 2026.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: October 2026