title: Zettelstore boxes
role: manual
tags: #configuration #manual #zettelstore
syntax: zmk
back: 00001003300000 00001004010000 00001006020000 00001012054600 00001012080500
backward: 00001003300000 00001004010000 00001006020000 00001012054600 00001012080500
box-name: manual
copyright: (c) 2020-present by Detlef Stern <ds@zettelstore.de>
created: 20210126175322
forward: 00001004011400 00001004011600 00001004050000 00001005090000
lang: en
license: EUPL-1.2-or-later
modified: 20260727185211
published: 20260727185211
visibility: public

Zettelstore must store its zettel somewhere.
In most cases you want to store your zettel as files in a directory.
Under certain circumstances you may want to store your zettel elsewhere.

An example is the [predefined zettel](00001005090000) that come with Zettelstore.
They are stored within the software itself.
In another situation you may want to store your zettel in volatile memory, e.g. if you want to provide a sandbox for experimenting.

To cope with these (and more) situations, you configure Zettelstore to use one or more *boxes*.
This is done using the `box-uri-X` keys of the [startup configuration](00001004010000#box-uri-X) (X is a number).
Boxes are specified using special [URIs](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier), similar to web addresses.

The following box URIs are supported:



All boxes that you configure via the `box-uri-X` keys form a chain of boxes.
When Zettelstore retrieves a zettel, a search starts in the box specified with the `box-uri-1` key, then `box-uri-2` and so on.
If a zettel is created or changed, it is always stored in the box specified with the `box-uri-1` key.
This allows you to overwrite zettel from other boxes, e.g. the predefined zettel.

Every box has a unique &ldquo;name&rdquo;.
The name of a box can be assigned if you set the URI query parameter `name` to its desired value.
It is an error if you give the same name twice.
If no query parameter `name` is given, Zettelstore checks whether the URI scheme can be used as a unique name.
As a last resort, a name is calculated by the URI position, and optionally made unique by adding the value of another counter.

If you use the `mem:` box, where zettel are stored in volatile memory, it only makes sense if you configure it as `box-uri-1`.
Such a box will be empty when Zettelstore starts, and only the first box will receive updates.
You must ensure that your computer has enough RAM to store all zettel.