Configure memory boxes

00001004011600 · Ref · Info · (manual) · #configuration #manual #zettelstore (all) · Context

Most applications should configure the memory box explicitly. Configure the memory box by appending query parameters to the base box URI mem:.

The following parameters are supported:

ParameterDescriptionDefault valueMaximum value
max-bytesMaximum storage size of the box (in bytes)655351073741824 (1 GiB)
max-zettelMaximum number of zettel12765535
readonlyAllow only read operationsfalsen/a
nameUnique name of the boxn/an/a

The default values provide reasonable limits for many applications.

The number of zettel is usually easy to estimate.

The number of bytes is usually more difficult to determine. A zettel requires 6 bytes for its identifier. Each metadata entry additionally requires the lengths of its key and value, plus a one-byte separator. Content contributes its size in bytes. For text content, this is the size of its UTF-8 encoding.

If one of the limits is exceeded, Zettelstore returns HTTP status code 507 (Insufficient Storage).

The readonly parameter exists primarily to support the read-only-mode startup configuration. Since a memory box is initially empty, enabling readonly effectively prevents the creation or modification of zettel.