Installing a deadbolt or a lock would be kinda lame considering the setting, barring the door from the inside makes more sense. Doors leading to the exterior of buildings should have deadbolts already, maybe [c]osing a closed door would lock it.
Like, installing a bracketed cross bar with a 2x4 some nails and scrap metal, or something like that, would make it harder to break down (although not as much as boarding it up) and would prevent NPCs from coming in as well.
Padlocks should be a thing though, maybe you could chain wire gates closed with a chain and padlock and you could padlock a cross bar as well, so NPCs can’t stroll through no matter what side of the door they are on, so you can lock up your safehouse while you are out pillaging the countryside.