Zettelstore startup configuration

00001004010000 · Info · (manual) · #configuration #manual #zettelstore

The configuration file, as specified by the -c CONFIGFILE command line option, allows you to specify some startup options. These options cannot be stored in a configuration zettel because either they are needed before Zettelstore can start or because of security reasons. For example, Zettelstore need to know in advance, on which network address is must listen or where zettel are stored. An attacker that is able to change the owner can do anything. Therefore only the owner of the computer on which Zettelstore runs can change this information.

The file for startup configuration must be created via a text editor in advance.

The syntax of the configuration file is the same as for any zettel metadata. The following keys are supported:

admin-port

Specifies the TCP port through which you can reach the administrator console. A value of 0 (the default) disables the administrator console. The administrator console will only be enabled if Zettelstore is started with the run sub-command.

On most operating systems, the value must be greater than 1024 unless you start Zettelstore with the full privileges of a system administrator (which is not recommended).

Default: 0

box-uri-X, where X is a number greater or equal to one

Specifies a box where zettel are stored. During startup X is counted up, starting with one, until no key is found. This allows to configure more than one box.

If no box-uri-1 key is given, the overall effect will be the same as if only box-uri-1 was specified with the value dir://.zettel. In this case, even a key box-uri-2 will be ignored.

default-dir-box-type

Specifies the default value for the (sub-) type of directory boxes. Zettel are typically stored in such boxes.

Default: notify

insecure-cookie

Must be set to true, if authentication is enabled and Zettelstore is not accessible not via HTTPS (but via HTTP). Otherwise web browser are free to ignore the authentication cookie.

Default: false

listen-addr

Configures the network address, where is zettel web service is listening for requests. Syntax is: [NETWORKIP]:PORT, where NETWORKIP is the IP-address of the networking interface (or something like 0.0.0.0 if you want to listen on all network interfaces, and PORT is the TCP port.

Default value: "127.0.0.1:23123"

owner
Identifier of a zettel that contains data about the owner of the Zettelstore. The owner has full authorization for the Zettelstore. Only if owner is set to some value, user authentication is enabled.
persistent-cookie

A boolean value to make the access cookie persistent. This is helpful if you access the Zettelstore via a mobile device. On these devices, the operating system is free to stop the web browser and to remove temporary cookies. Therefore, an authenticated user will be logged off.

If true, a persistent cookie is used. Its lifetime exceeds the lifetime of the authentication token (see option token-lifetime-html) by 30 seconds.

Default: false

read-only-mode
Puts the Zettelstore web service into a read-only mode. No changes are possible. Default: false.
token-lifetime-api, token-lifetime-html

Define lifetime of access tokens in minutes. Values are only valid if authentication is enabled, i.e. key owner is set.

token-lifetime-api is for accessing Zettelstore via its API. Default: 10.

token-lifetime-html specifies the lifetime for the HTML views. Default: 60. It is automatically extended, when a new HTML view is rendered.

url-prefix

Add the given string as a prefix to the local part of a Zettelstore local URL/URI when rendering zettel representations. Must begin and end with a slash character (“/”, U+002F). Default: "/".

This allows to use a forwarding proxy server in front of the Zettelstore.

verbose
Be more verbose inf logging data. Default: false