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.

Database 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

Weavy 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 links in outgoing emails etc.
Clients A list of client(s) for REST API authentication.
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.
IdentityProviders A list of identity providers for frontend authentication.
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.

* 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 the web.config file.

"Kestrel": {
    "Limits": {
      "MaxRequestBodySize": 134217728
    }
}    
<requestLimits maxAllowedContentLength="134217728" />

Plugins

Many built-in features in Weavy are implemented in the form of plugins. To configure a plugin, you should add an entry in the Weavy:Plugins section with the Type property set to the assembly qualified name of the plugin. Configuration values for the plugin can then be specified as in the example below:

"Weavy": {
  "Plugins": [{
    "Type": "Weavy.Core.Plugins.CleanupDaemon, Weavy.Core",
    "Trash": false
  }]
}

Blob providers

Blob providers are plugins that control where uploaded files are stored. By default Weavy uses the SqlServerBlobProvider which stores blobs in the Weavy database, but by configuring one of the other blob providers you can tell Weavy to store files in an Azure Storage account or on disk instead of the database.

Weavy.Core.Plugins.SqlServerBlobProvider, Weavy.Core

The default blob provider which stores blobs in the Weavy database. Has no configuration settings.

Weavy.Core.Plugins.AzureBlobProvider, Weavy.Core

A provider that stores uploaded files in an Azure Storage account. This is the recommended provider to use when deploying Weavy to Microsoft Azure.

Setting Description
ConnectionString The connection string to the Azure Storage account.
ContainerName The name of the container in the Azure Storage account where blobs should be stored. Defaults to files.

Weavy.Core.Plugins.DiskBlobProvider, Weavy.Core

A provider that stores blobs on local disk.

Setting Description
Path Absolute or relative file path where the files should be stored. E.g. files or C:\Weavy\files. Default is blobs.

Hooks

Hooks are plugins that performs some action in reaction to an event in Weavy (for instance a file being uploaded).

Weavy.Core.Plugins.BlobHook, Weavy.Core

A hook that creates thumbnails and extracts text for fulltext indexing.

Setting Description
Thumbnails Indicates whether to create thumbnail images for uploaded blobs. Default is true.
Text Indicates whether to extract text for fulltext indexing from uploaded blobs. Default is false.
MaxThumbnailWidth Maximum allowed thumbnail width. Defaults to 1024 pixels.
MaxThumbnailHeight Maximum allowed thumbnail height. Defaults to 1024 pixels.
MaxThumbnailSize Maximum allowed thumbnail size (in bytes). Defaults to 5242880 (5 MB).

Daemons

Daemons are plugins configured to execute their code on a schedule defined by a cron expression. If you want to change the default schedule of a daemon you can configure the Schedule property. You can also disable a daemon by setting the Schedule to an empty string "".

Weavy.Core.Plugins.CleanupDaemon, Weavy.Core

Performs various cleanup tasks such as removing temp files etc.

Setting Description
Cache Indicates whether files that have not been accessed in the last 7 days should be deleted from the file system cache. Default is true.
Blobs Indicates whether orphaned blobs should be deleted from the repository. Default is true.
Notifications Indicates whether notifications that were read more than 30 days ago should be deleted. Default is true.
Schedule The cron expression representing the schedule when the daemon should run. Defaults to 0 0 * * *.
Temp Indicates whether files that have not been accessed in the last 24 hours should be deleted from the temp directory. Default is true.
Trash Indicates whether entities deleted more than 30 days ago should be removed from the recycle bin. Default is true.

Weavy.Core.Plugins.IdentityProviderDaemon, Weavy.Core

Periodically updates identity providers to support multiple and rotating signing keys.

Setting Description
Schedule The cron expression representing the schedule when the daemon should run. Defaults to 0 8 * * *.

Weavy.Core.Plugins.IndexDaemon, Weavy.Core

Updates the fulltext index with entities modified or added since the last indexing operation.

Setting Description
BatchSize The number of items to index in each batch. Defaults to 250.
Schedule The cron expression representing the schedule when the daemon should run. Defaults to * * * * *.

Weavy.Core.Plugins.LicenseDaemon, Weavy.Core

Refreshes license data from the license server.

Setting Description
Schedule The cron expression representing the schedule when the daemon should run. Defaults to 0 */1 * * *.

Weavy.Core.Plugins.MessageDaemon, Weavy.Core

A daemon that sends emails about unread conversations and messages.

Setting Description
Delay Period of time to wait before sending email, this allow users time to read messages before the email is sent. Defaults to 00:05 (5 minutes).
MaxAge Maximum age of unread messages to include in the email, used to prevent sending old unread messages, e.g. if the daemon was disabled or if the user just enabled email notifications. Defaults to 24:00 (24 hours).
BatchSize The number of times to re-use the same smtp client. Some email services, e.g. Sendgrid, limit the number of emails you can send per connection. Defaults to 100.
Schedule The cron expression representing the schedule when the daemon should run. Defaults to */5 * * * *.

Weavy.Core.Plugins.PresenceDaemon, Weavy.Core

Keeps track of the online status of users.

Setting Description
Schedule The cron expression representing the schedule when the daemon should run. Defaults to * * * * *.

Weavy.Core.Plugins.StatisticsDaemon, Weavy.Core

Creates data points for displaying usage statistics.

Setting Description
Schedule The cron expression representing the schedule when the daemon should run. Defaults to 0 4 * * *.

Weavy.Core.Plugins.ZoomProxyDaemon, Weavy.Core

Polls the Zoom proxy server for updates in meetings.

Setting Description
Schedule The cron expression representing the schedule when the daemon should run. Defaults to 0/5 * * * *.

Features and integrations

Weavy also includes some optional features and integrations with 3rd party services that require additional configuration. The articles below have instructions on how to enable and configure them.

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-app.com",
    "AllowedOrigins": "https://myapp.com;https://another-app.com",
    "MultipartBodyLengthLimit": 134217728,
    "IdentityProviders": [
      {
        "Issuer": "my-app",
        "Secret": "MCaQXlgtfn"
      }
    ],
    "Clients": [
      {
        "Id": "api-connect",
        "Secret": "wM0B7cK5U7"
      }
    ],
    "License": "AAAAA-BBBBB-CCCCC-DDDDD",
    "LogLevel": "Debug",
    "Smtp": {
      "Server": "localhost",
      "From": "info@weavy.test"
    },
    "Plugins": [
      {
        "Type": "Weavy.Core.Plugins.StatisticsDaemon, Weavy.Core",
        "Schedule": ""
      },
      {
        "Type": "Weavy.Core.Plugins.CleanupDaemon, Weavy.Core",
        "Trash": false
      },
      {
        "Type": "Weavy.Core.Plugins.MessageDaemon, Weavy.Core",
        "Delay": "00:00:30"
      }
    ],
    "Features": {
      "ZoomMeetings": true
    },
    "Zoom": {
      "ClientId": "huax029SZ5ttDCLyg",
      "ClientSecret": "NZLETeKyX2CTr1wjJpmELmFwJQ"
    }
}
Weavy Docs