-
-
Notifications
You must be signed in to change notification settings - Fork 82
Environment Variables
The path to the directory in which notes are/should be stored.
Required when not using the Docker image. Defaults to /app/data
(within the container) when using the Docker image.
There are currently 3 types of authentication supported:
-
none
- No authentication. -
password
- A username and password is required to access flatnotes. SeeFLATNOTES_USERNAME
andFLATNOTES_PASSWORD
below. -
totp
- In addition to a username and password, a time based one-time-password is also required to access flatnotes.
Defaults to password
if not provided.
To use the totp
authentication type you will also need to supply a FLATNOTES_TOTP_KEY
(see below). Upon startup, flatnotes will print a QR code which can be used to add flatnotes to an authentication app such as Authy or Google Authenticator. Docker users can view this QR code by looking at the containers logs e.g. docker logs flatnotes
.
When using the API with totp enabled, you'll need to append the current totp code to your password (e.g. changeMe!123456
) when calling the /api/token
endpoint.
The username and password used to access flatnotes.
Required when FLATNOTES_AUTH_TYPE
is set to password
or totp
. Not applicable when FLATNOTES_AUTH_TYPE
is set to none
.
The secret key used to generate access tokens. Changing this will invalidate all existing access tokens.
I recommend using a password generator to generate random 32 character string.
Required.
Defines how many days an access token is valid for (before a username, password and (possibly) a totp code is required to login again).
Defaults to 30
if not provided.
The secret key used to generate totp codes. Changing this will invalidate the totp configuration.
I recommend using a password generator to generate random 32 character string.
Required when FLATNOTES_AUTH_TYPE
is totp
. Not applicable for other authentication types.
This is applicable to the Docker image only.
Controls the port flatnotes binds to inside the container. This is useful in environments where port 80 is considered privalidged even inside a container environment (see the conversation on this issue).
Defaults to 80.