-
Notifications
You must be signed in to change notification settings - Fork 71
Configuration
We use the ASP.NET Core Configuration model for all settings.
You can configure Notifo using the following ways:
- The
appsettings.json
file. - The
appsettings.Production.json
file. - Environment variables.
- Command line arguments.
The ordering is important. Command line arguments override other settings, environment variables override the json files and so on. Using a combination of all these options can be very helpful.
Read the comments of the appsettings.json
file to understand all configuration settings.
In this example we want to override the following setting from the configuration file:
{
"assetStore": {
"folder": {
"path": "MyAssets"
}
}
}
If you combine all keys from the json root to the setting you get the full key of this setting.
Aggregate the keys by two underscores to get the name of the environment variable:
ASSETSTORE__FOLDER__PATH="MyAssets"
Aggregate the keys by colon and you get the name of the command line argument
assetstore:folder:path="MyAssets"
Casing does not matter.
These are the most important settings:
-
urls:baseUrl
: The base URL under which Notifo is running. It is used to generate hyperlinks and to make redirects with the correct host name. In some environments, Notifo is running behind several proxies, e.g. cloudflare, google load balancer and so on. In these cases the original host name might get lost. Therefore we introduced this configuration value. -
identity:adminEmail
: The email address of the admin user. You can also set the admin email with the initial setup screen. -
identity:adminPassword
: The password of the admin user (Must contain lowercase, uppercase letter, number and special character). You can also set the admin password with the initial setup screen. ser (Must contain lowercase, uppercase letter, number and special character). You can also set the admin password with the initial setup screen.
Set
identity:googleClient
identity:githubClient
identity:microsoftClient
to empty to disable authentication with third party providers.
Many systems support health checks to determinate the health of a service. For example load balancers periodically call an endpoint of the service to remove dead nodes from the list of available nodes and to stop serving HTTP requests to these nodes.
Notifo provides the following health checks:
-
/healthz
(e.g. https://app.notifo.io/healthz): An endpoint to check if Notifo can serve HTTP requests. Recommended health check for liveness, startup and readiness probes.
Please check the logs to see detailed error messages.
Typically the login fails, because the urls:baseUrl
setting has an invalid value. Ensure that the domain that is used by your users is configured here. Notifo might run behind several other servers like Cloudflare, load balancers and reverse proxies and does not know the original domain. Therefore we must configure the URL.
Ensure that you have configured a strong password if you use identity:adminPassword
.
You will see the following entry in your logs:
{
"logLevel": "Error",
"action": "createAdmin",
"status": "failed",
"exception": {
...
"message": "Cannot create user:...",
...
}
}`
The password requirements are:
- Passwords must be at least 6 characters.
- Passwords must have at least one non alphanumeric character.
- Passwords must have at least one digit ('0'-'9').
- Passwords must have at least one lowercase ('a'-'z').
- Passwords must not have been appeared in a data breach before: https://haveibeenpwned.com/
In case you have forgotten your admin password you can use the identity:adminRecreate=true
to always update the admin account with the password from the configuration.