title: Configure file directory boxes
role: manual
tags: #configuration #manual #zettelstore
syntax: zmk
back: 00001004011200 00001006020000 00001006020400 00001018000000
backward: 00001004011200 00001006020000 00001006020400 00001018000000
box-number: 1
copyright: (c) 2020-present by Detlef Stern <ds@zettelstore.de>
created: 20210126175322
forward: 00001003000000 00001004051000
lang: en
license: EUPL-1.2-or-later
modified: 20250701135923
published: 20250701135923
visibility: public

Under certain circumstances, it is preferable to further configure a file directory box.
This is done by appending query parameters after the base box URI `dir://DIR`.

The following parameters are supported:



# Type

On some operating systems, Zettelstore tries to detect changes to zettel files outside of Zettelstore's control.
On other operating systems, this may not be possible due to technical limitations.
Automatic detection of external changes is also not possible, if zettel files are put on an external service, such as a file server accessed via SMB/CIFS or NFS.

To cope with this uncertainty, Zettelstore provides various internal implementations of a directory box.
The default values should match the needs of different users, as explained in the [installation part](00001003000000) of this manual.
The following values are supported:



# Worker

Internally, Zettelstore parallels concurrent requests for a zettel or its metadata.
The number of parallel activities is configured by the `worker` parameter.

A computer contains a limited number of internal processing units (CPUs).
Their number ranges from 1 up to (currently) 128, for example in larger server environments.
Zettelstore typically runs on systems with 1 to 8 CPUs.
Access to zettel files is ultimately managed by the underlying operating system.
Depending on the hardware and the type of directory box, only a limited number of parallel accesses is desirable.

On smaller hardware, such as the [Raspberry Pi Zero](https://www.raspberrypi.com/products/raspberry-pi-zero/), a smaller value might be appropriate.
Every worker needs some amount of main memory (RAM) and some amount of processing power.
On bigger hardware, with some fast file services, a bigger value could result in higher performance, if needed.

For various reasons, the value should be a prime number.
The software might enforce this restriction by selecting the next prime number of a specified non-prime value.
The default value is 7, the minimum value is 1, the maximum value is 1499.

# Readonly

Sometimes you may want to provide zettel from a file directory box, but you want to disallow any changes.
If you provide the query parameter `readonly` (with or without a corresponding value), the box will disallow any changes.

    box-uri-1: dir:///home/zettel?readonly

If you put the whole Zettelstore in [read-only](00001004010000#read-only-mode) [mode](00001004051000), all configured file directory boxes will be in read-only mode too, even if not explicitly configured.