Vikunja supports using `toml`, `yaml`, `hcl`, `ini`, `json`, envfile, env variables and Java Properties files.
We reccomend yaml or toml, but you're free to use whatever you want.
Vikunja provides a default [`config.yml`](https://kolaente.dev/vikunja/api/src/branch/master/config.yml.sample) file which you can use as a starting point.
The following explains all possible config variables and their defaults.
You can find a full example configuration file in [here](https://code.vikunja.io/api/src/branch/master/config.yml.sample).
If you don't provide a value in your config file, their default will be used.
## Nesting
Most config variables are nested under some "higher-level" key.
For example, the `interface` config variable is a child of the `service` key.
The docs below aim to reflect that leveling, but please also have a lookt at [the default config](https://code.vikunja.io/api/src/branch/master/config.yml.sample) file
to better grasp how the nesting looks like.
<!-- Generated config will be injected here -->
---
## service
### JWTSecret
This token is used to verify issued JWT tokens.
Default is a random token which will be generated at each startup of vikunja.
(This means all already issued tokens will be invalid once you restart vikunja)
Default: `<jwt-secret>`
### interface
The interface on which to run the webserver
Default: `:3456`
### frontendurl
The URL of the frontend, used to send password reset emails.
Default: `<empty>`
### rootpath
The base path on the file system where the binary and assets are.
Vikunja will also look in this path for a config file, so you could provide only this variable to point to a folder
with a config file which will then be used.
Default: `<rootpath>`
### maxitemsperpage
The max number of items which can be returned per page
Default: `50`
### enablecaldav
Enable the caldav endpoint, see the docs for more details
Default: `true`
### motd
Set the motd message, available from the /info endpoint
Default: `<empty>`
### enablelinksharing
Enable sharing of lists via a link
Default: `true`
### enableregistration
Whether to let new users registering themselves or not
The time zone all timestamps are in. Please note that time zones have to use [the official tz database names](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). UTC or GMT offsets won't work.
How long (in seconds) the results of a preflight request can be cached.
Default: `0`
---
## mailer
### enabled
Whether to enable the mailer or not. If it is disabled, all users are enabled right away and password reset is not possible.
Default: `false`
### host
SMTP Host
Default: `<empty>`
### port
SMTP Host port
Default: `587`
### username
SMTP username
Default: `user`
### password
SMTP password
Default: `<empty>`
### skiptlsverify
Wether to skip verification of the tls certificate on the server
Default: `false`
### fromemail
The default from address when sending emails
Default: `mail@vikunja`
### queuelength
The length of the mail queue.
Default: `100`
### queuetimeout
The timeout in seconds after which the current open connection to the mailserver will be closed.
Default: `30`
### forcessl
By default, vikunja will try to connect with starttls, use this option to force it to use ssl.
Default: `false`
---
## log
### path
A folder where all the logfiles should go.
Default: `<rootpath>logs`
### enabled
Whether to show any logging at all or none
Default: `true`
### standard
Where the normal log should go. Possible values are stdout, stderr, file or off to disable standard logging.
Default: `stdout`
### level
Change the log level. Possible values (case-insensitive) are CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG.
Default: `INFO`
### database
Whether or not to log database queries. Useful for debugging. Possible values are stdout, stderr, file or off to disable database logging.
Default: `off`
### databaselevel
The log level for database log messages. Possible values (case-insensitive) are CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG.
Default: `WARNING`
### http
Whether to log http requests or not. Possible values are stdout, stderr, file or off to disable http logging.
Default: `stdout`
### echo
Echo has its own logging which usually is unnessecary, which is why it is disabled by default. Possible values are stdout, stderr, file or off to disable standard logging.
Local authentication will let users log in and register (if enabled) through the db.
This is the default auth mechanism and does not require any additional configuration.
Default: `<empty>`
### openid
OpenID configuration will allow users to authenticate through a third-party OpenID Connect compatible provider.<br/>
The provider needs to support the `openid`, `profile` and `email` scopes.<br/>
**Note:** The frontend expects to be redirected after authentication by the third party
to <frontend-url>/auth/openid/<authkey>. Please make sure to configure the redirect url with your third party
auth service accordingy if you're using the default vikunja frontend.
Take a look at the [default config file](https://kolaente.dev/vikunja/api/src/branch/master/config.yml.sample) for more information about how to configure openid authentication.