title: Zettelstore startup configuration role: manual tags: #configuration #manual #zettelstore syntax: zmk back: 00001003300000 00001003310000 00001004000000 00001004050000 00001004051100 00001005000000 00001005090000 00001006020000 00001007031200 00001007040310 00001008010000 00001008010500 00001010070200 00001012050200 00001012054600 00001012920000 00001017000000 00001018000000 backward: 00001003300000 00001003310000 00001004000000 00001004011200 00001004011400 00001004050000 00001004051000 00001004051100 00001004100000 00001005000000 00001005090000 00001006020000 00001007031200 00001007040310 00001008000000 00001008010000 00001008010500 00001010000000 00001010040100 00001010040700 00001010070200 00001010090100 00001012050200 00001012054600 00001012920000 00001017000000 00001018000000 box-number: 1 copyright: (c) 2020-present by Detlef Stern created: 20210126175322 forward: 00001004011200 00001004011400 00001004020000 00001004051000 00001004059700 00001004100000 00001004101000 00001006030500 00001006050000 00001008000000 00001010000000 00001010040100 00001010040700 00001010090100 00001012000000 00001014000000 lang: en license: EUPL-1.2-or-later modified: 20240220190138 published: 20240220190138 visibility: public The configuration file, as specified by the ''-c CONFIGFILE'' [[command line option|00001004051000]], allows you to specify some startup options. These options cannot be stored in a [[configuration zettel|00001004020000]] 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|''admin-port''] : Specifies the TCP port through which you can reach the [[administrator console|00001004100000]]. 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|00001004051000]]. 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"" ; [!asset-dir|''asset-dir''] : Allows to specify a directory whose files are allowed be transferred directly with the help of the web server. The URL prefix for these files is ''/assets/''. You can use this if you want to transfer files that are too large for a note to users. Examples would be presentation files, PDF files, music files or video files. Files within the given directory will not be managed by Zettelstore.[^They will be managed by Zettelstore just in the case that the directory is one of the configured [[boxes|#box-uri-x]].] If you specify only the URL prefix, then the contents of the directory are listed to the user. To avoid this, create an empty file in the directory named ""index.html"". Default: """", no asset directory is set, the URL prefix ''/assets/'' is invalid. ; [!base-url|''base-url''] : Sets the absolute base URL for the service. Note: [[''url-prefix''|#url-prefix]] must be the suffix of ''base-url'', otherwise the web service will not start. Default: ""http://127.0.0.1:23123/"". ; [!box-uri-x|''box-uri-X''], where __X__ is a number greater or equal to one : Specifies a [[box|00001004011200]] 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. ; [!debug-mode|''debug-mode''] : Allows to debug the Zettelstore software (mostly used by the developers) if set to [[true|00001006030500]] Disables any timeout values of the internal web server and does not send some security-related data. Sets [[''log-level''|#log-level]] to ""debug"". Do not enable it for a production server. Default: ""false"" ; [!default-dir-box-type|''default-dir-box-type''] : Specifies the default value for the (sub-) type of [[directory boxes|00001004011400#type]]. Zettel are typically stored in such boxes. Default: ""notify"" ; [!insecure-cookie|''insecure-cookie''] : Must be set to [[true|00001006030500]], 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"" ; [!insecure-html|''insecure-html''] : Allows to use HTML, e.g. within supported markup languages, even if this might introduce security-related problems. However, HTML containing the ``