Configuring Weavy
Many features in Weavy can be enabled, disabled and/or modified via configuration settings.
These settings are usually stored in an appsettings.json
file, but depending on your environment,
other configuration providers are also available.
Connection string
The ConnectionStrings
section must be configured with a connection string to the Weavy
database as shown in the example below:
"ConnectionStrings": {
"Weavy": "server=localhost;database=weavy;trusted_connection=true;"
}
For more information about connection string syntax see: SQL Server 2019 connection strings
Settings
The Weavy
configuration section can be configured with the following settings:
Setting | Description |
---|---|
AllowedOrigins |
Configures the Access-Control-Allow-Origin header for CORS. Separate multiple entries with semicolon, e.g. "http://www.example.com;https://www.example.org" |
ApplicationName |
The name of the application. Defaults to "Weavy" . |
ApplicationUrl |
The absolute url to your Weavy application, e.g. "https://company.weavycloud.com" . Used when generating fully qualified urls in API responses etc. |
ArchiveDownloadLimit |
The maximum allowed size when downloading a set of files as a zip-archive. Defaults to 268435456 bytes (256 MB). |
FileTypes |
A list of file type specifiers that defines the file types that can be uploaded. Separate multiple values with semicolon, e.g. "image/*;.docx;.pdf" . When not specified all file types can be uploaded. |
License |
Your license key. |
LogLevel |
The minimum log level. Possible values are: Verbose , Debug , Information , Warning , Error , Fatal . Defaults to "Information" in production and "Debug" in development. |
MultipartBodyLengthLimit * |
The maximum size (in bytes) to allow for file upload requests. Defaults to 134217728 bytes (approximately 128MB). |
Reactions |
Configures the selection of possible emoji-reactions. Separate multiple values with semicolon. Defaults to 😍;😆;😮;😢;😡;👍. |
Smtp:From |
The email address from which outgoing emails should be sent. |
Smtp:Password |
The password to use for authentication against the SMTP server. |
Smtp:Port |
The port to use when communicating with the SMTP server. Default value is 25 . |
Smtp:Server |
The name or IP address of the host used for SMTP transactions. |
Smtp:Username |
The username to use for authentication against the SMTP server. |
Smtp:DefaultCredentials |
Set to true to ignore username and password and send the default credentials with requests. Default is false . |
Smtp:Ssl |
Set to true to use Secure Sockets Layer (SSL) to encrypt the connection with the SMTP server. Default is false . |
TimeZone |
The timezone identifier of the timezone to use when converting UTC dates to local time for display. When not specified the local timezone on the Weavy server is used. |
WebhookTimeout |
The time (in seconds) before a webhook request times out. Defaults to 10 seconds. |
* If you want to allow files larger than 30 MB you also need to configure MaxRequestBodySize for Kestrel (the default web server for ASP.NET Core). By default it is set to 30000000 bytes (approximately 28.6MB). Additionally, if you are running Weavy behind IIS you also need to configure the
maxAllowedContentLength
attribute in theweb.config
file.
"Kestrel": {
"Limits": {
"MaxRequestBodySize": 134217728
}
}
<requestLimits maxAllowedContentLength="134217728" />
Example
A complete appsetting.json
file could look something like this:
"ConnectionStrings": {
"Weavy": "server=localhost;database=weavy;trusted_connection=true;"
},
"Kestrel": {
"AddServerHeader": false,
"Limits": {
"MaxRequestBodySize": 134217728
}
},
"Weavy": {
"ApplicationName": "Weavy",
"ApplicationUrl": "https://weavy.example.com",
"AllowedOrigins": "https://app.example.com;https://another-app.example.org",
"MultipartBodyLengthLimit": 134217728,
"License": "AAAAA-BBBBB-CCCCC-DDDDD",
"LogLevel": "Debug",
"Smtp": {
"Server": "localhost",
"From": "info@example.com"
},
"Plugins": [
{
"Type": "Weavy.Core.Plugins.StatisticsDaemon, Weavy.Core",
"Schedule": ""
},
{
"Type": "Weavy.Core.Plugins.TrashDaemon, Weavy.Core",
"Age": "24:00:00"
}
]
}