How to install locks on barn-style doors

Move forward by thinking backward
Conventional locks install on the door and the locking point is on the jamb. When locked, the door stays attached to the jamb. A barn door is different. It is generally a large piece of wood, floating along a wall. This makes alignment the big issue. In a traditional barn door installation, the locking bolt cannot be easily aligned with the strike that is intended to be the locking point. Thus, the key challenge for barn doors is aligning the lock and the strike. The best solution is to have a tubular privacy barn-door lock that installs into the jamb wall, with the strike in the door.
This is the exact opposite of what door installers are used to. Typically, the lock installs into the wall, not the door, and the strike installs into the door, not the jamb (Figure 1).
This type of configuration features a locking mechanism similar to a deadbolt, installed inside the jamb wall, featuring a 25-mm (1-in.) bolt activated by a thumb piece, and projecting into the door.
A dust-proof strike is installed on the door itself, and is locked in place when aligned with the lock bolt in the closed position. Privacy locks must be accompanied by an emergency release that can unlock the door from outside the room in the event of a crisis inside the room while the door is closed.
With this type of privacy barn-door lock, the locking mechanism is concealed inside the wall. The trim is attached with a minimally projecting thumb-turn, or even a recessed trim with a finger-pull turn.
The strike itself features a spring-loaded, dust-proof cover to conceal the strike opening on the door; there is a small decorative cap on the opposite side of the door. Most importantly, this type of locking solution includes an emergency release hole built right into the strike. This allows the lock bolt to be pushed back from outside the barn door, allowing immediate access to the room in the event of an emergency.
This type of lockset is only suitable for a barn door hung on the outside wall of a room. It is important to note the lock is only intended for basic privacy; it does not offer the higher security of a keyed lock.
The specified slider id does not exist.