6. Config.php

The config file for the webapp. All possible web client settings can be set in this file. Some settings (such as language) can also be set per user or logon.

6.1. Config check

// Comment next line to disable the config check (or set FALSE to log the config errors)

If set to true a check will be made for php-version, php-mapi and a tmp folder.

// Use these options to optionally disable some PHP configuration checks.
// WARNING: these checks will disable checks regarding the security of the WebApp site configuration,
// only change them if you know the consequences - improper use will lead to an insecure installation!

This config option checks if cookies are used with an insecure connection. Default is false.

6.2. Default server socket

// Depending on your setup, it might be advisable to change the lines below to one defined with your
// default socket location.
// Normally "default:" points to the default setting ("file:///var/run/kopano/server.sock")
// Examples: define("DEFAULT_SERVER", "default:");
//           define("DEFAULT_SERVER", "http://localhost:236/kopano");
//           define("DEFAULT_SERVER", "https://localhost:237/kopano");
//           define("DEFAULT_SERVER", "file:///var/run/kopano/server.sock");
define("DEFAULT_SERVER", "default:");

This config options defines the default (Kopano Core) socket location.

6.3. Redirects with an Nginx reverse proxy

When you are using a setup with an Nginx webserver as a reverse proxy (e.g. for Web Meetings), adding an explicit redirect to your configuration is recommended to avoid an unintended downgrade to HTTP from HTTPS.

// Add this just before '/location webapp'
location = /webapp {
        return 302 /webapp/;

6.4. Single Sign-On & OIDC

// When using a single sign-on system on your webserver, but Kopano Core is on another server
// you can use https to access the Kopano server, and authenticate using an SSL certificate.

When using a single sign-on system on your webserver, but Kopano Core is on another server you can use https to access the Kopano server, and authenticate using an SSL certificate.

// Set to false to disable login with Single Sign-On (SSO) on SSO environments.

This option allows you to disable Single Sign-On connections. Default is true.

// OIDC Server Configuration, introduced in 8.7.0
define('OIDC_ISS', '');
    define('OIDC_CLIENT_ID', '');
    define('OIDC_SCOPE', 'openid profile email kopano/gc');

These options are used to configure OIDC login. By default OIDC is disabled when OIDC_ISS (issuer) is empty.

// set to 'true' to strip domain from login name found from Single Sign-On webservers
define("LOGINNAME_STRIP_DOMAIN", false);

This option strips the domain from the users’ login name. Default is false.


If your OIDC server is hosted on a different domain make sure you allow webapp to authenticate with it. For Kopano-konnectd you can use this example that needs to be added in /etc/kopano/konnectd-identifier-registration.yaml

  trusted: yes
  application_type: web
      - https://example.com/webapp/
      - https://example.com/webapp/index.php
      - https://example.com/webapp/index.php?logout
      - https://example.com/webapp/oidc-silent-refresh.php
      - https://example.com/webapp

6.6. Secure Cookies

// Set to 'false' to disable secure session cookies and to allow log-in without HTTPS.
    define("SECURE_COOKIES", true);

By default only secure cookies are allowed.

6.7. DOMPurify

// Use DOMPurify to filter HTML

Enable this setting to use DOMPurify to filter HTML

6.8. Session timeout

// The timeout (in seconds) for the session. User will be logged out of WebApp
// when he has not actively used the WebApp for this time.
// Set to 0 (or remove) for no timeout during browser session.
define('CLIENT_TIMEOUT', 0);

Session timeout in WebApp. Default is 0 which means no timeout.

6.9. Cross domain authentication

// Defines the domains from which cross domain authentication requests
// are allowed. E.g. if WebMeetings runs under a different domain than
// the WebApp then add this domain here. Add http(s):// to the domains
// and separate domains with spaces.
// Set to empty string (default) to only allow authentication requests
// from within the same domain.
// Set to "*" to allow authentication requests from any domain. (not
// recommended)

Defines the domains from which cross domain authentication requests are allowed.

6.10. Base URL

// Defines the base url and end with a slash.
$base_url = dirname($_SERVER["PHP_SELF"]);
if(substr($base_url,-1)!="/") $base_url .="/";
define("BASE_URL", $base_url);

With this option you can define the base URL for WebApp.

6.11. Temp path

// Defines the temp path (absolute). Here uploaded attachments will be saved.
// The web client doesn't work without this directory.
define("TMP_PATH", "/var/lib/kopano-webapp/tmp");

Directory of the temporary files.

6.12. Plugin directory

// Define the path to the plugin directory (No slash at the end)
define("PATH_PLUGIN_DIR", "plugins");

Directory where plugins should be stored.

6.13. Enable plugin usage

// Enable the plugins
define("ENABLE_PLUGINS", true);

Config option to enable or disable all plugins. Default is true.

6.14. Disable plugins

// Define list of disabled plugins separated by semicolon

Config option to disable specific plugins. Seperated by a semicolon (;).

6.15. Always enabled plugin list

// Define a list of plugins that cannot be disabled by users.
// Plugins should be seperated by a semicolon (;). A wildcard (*)
// can be used to identify multiple plugins.

Config option to always enable certain plugins. These plugins can’t be disabled by a user. This option is overridden by “DISABLED_PLUGINS_LIST”.

Valid values are the names defined in plugins manifest.xml (For example: smime/spellchecker/files etc).

6.16. Default enabled plugin list

// Defines the list of initially enabled plugins, separated by semicolon.
// The user can disable these plugins is his settings.
// Note: Plugins used to have this setting in their own config file, but this
// has been deprecated. WebApp will not use those old settings anymore.

This config option can be used to enable plugins by default. A user can still disable the plugin in the plugin list. The directory name of the specific plugin should be specified in this list.

6.17. Default WebApp theme

// General WebApp theme. This will be loaded by default for every user
// (if the theme is installed as a plugin)
// Users can override the 'logged-in' theme in the settings.
define("THEME", '');

Default WebApp theme. Default is empty which means the basic theme is set as default. The theme directory should be added here, not the display name.

6.18. Icon set

// General WebApp icon set. This will be loaded by default for every user.
// Users can override the iconset in the settings.
define("ICONSET", 'breeze');

Default icon set for every user. Default is ‘breeze’.

6.19. WebApp title

// The title that will be shown in the title bar of the browser
define("WEBAPP_TITLE", 'Kopano WebApp');

Title shown in the title bar of your browser. Default is ‘Kopano WebApp’.

6.20. WebApp manual

// The base URL where the User Manual for WebApp can be found
define("PLUGIN_WEBAPPMANUAL_URL", "https://documentation.kopano.io/user_manual_webapp/");

Location of the WebApp manual.

6.21. Enable full GAB

// Set addressbook for GAB not to show any users unless searching for a specific user
define("ENABLE_FULL_GAB", true);

Set addressbook for GAB not to show any users unless searching for a specific user. Default is true.

6.22. Enable public contacts

// Set to true to show public contact folders in address-book folder list,
// false will hide public contact folders in address-book folder list.

Option to enable public contact folders in the address book. Default is false.

6.23. Enable public folders

// Set true to show public folders in hierarchy, false will disable public folders in hierarchy.
define('ENABLE_PUBLIC_FOLDERS', true);

Config option to enable public folders in the hierarchy. Default is true.

6.24. Enable shared contact folders

// Set true to hide shared contact folders in address-book folder list,
        // false will show shared contact folders in address-book folder list.
        define("ENABLE_SHARED_CONTACT_FOLDERS", false);

Config option to enable shared contact folders. This can decrease performance when set to true. Default is false.

6.25. Enable conversation view

// Set to true to give users the option to enable conversation view in their settings
// Set to false to hide the setting and disable conversation view for all users

6.26. Enable file previewer

// Set to true to give users the option to enable file previewer in their settings
// Set to false to hide the setting and disable file previewer for all users
define("ENABLE_FILE_PREVIEWER", true);

6.27. Enable shared rules

// Set to true to give users the possiblity to edit, create and mail filters on the store
// of other users. The user needs owner permissions on the store of the other user.
define('ENABLE_SHARED_RULES', false);

Config option to enable shared rules. Default is false.

6.28. Booking method

// Booking method (true = direct booking, false = send meeting request)
define('ENABLE_DIRECT_BOOKING', true);

Resource booking options. true = direct booking, false = send meeting request. Default is true.

6.29. Compression

// Enable GZIP compression for responses

Response compression. Default is true.

6.30. Welcome screen

// When set to false this disables the welcome screen to be shown for first time users.
define('ENABLE_WELCOME_SCREEN', true);

Option to enable the welcome screen for new users. Default is true.

6.31. What’s new

// Set to false to disable the "What's new dialog" that will be shown to users to introduce new features.
    define('ENABLE_WHATS_NEW_DIALOG', true);

Option to enable what’s new for every user. Default is true.

6.32. Advanced settings

// When set to false it will disable showing of advanced settings.

Option to enable advanced settings in WebApp. Default is false.

6.33. Free / Busy status start offset

// Freebusy start offset that will be used to load freebusy data in appointments, number is subtracted from current time

Option to set the Free / Busy status start offset. Default is 7, so current day minus 7 days.

6.34. Free / Busy status end offset

// Freebusy end offset that will be used to load freebusy data in appointments, number is added to current time

Option to set the Free / Busy status end offset. Default is 90 (3 months).

6.35. Maximum EML files in zip

// Maximum eml files to be included in a single ZIP archive
define('MAX_EML_FILES_IN_ZIP', 50);

Config option define the maximum number of .EML files inside a ZIP archive. Default is 50.

6.36. Additional calendar colors

// Additional color schemes for the calendars can be added by uncommenting and editing the following define.
// The format is the same as the format of COLOR_SCHEMES which is defined in default.php
// To change the default colors, COLOR_SCHEMES can also be defined here.
// Note: Every color should have a unique name, because it is used to identify the color
// define('ADDITIONAL_COLOR_SCHEMES', json_encode(array(
//              array(
//                      'name' => 'pink',
//                      'displayName' => _('Pink'),
//                      'base' => '#ff0099'
//              )
// )));

Option to create your own color schemes and use it as a calendar color.

6.37. Additional prefixes

// Additional Prefix for the Contact name can be added by uncommenting and editing the following define.
// define('CONTACT_PREFIX', json_encode(array(
//      array(_('Er.')),
//      array(_('Gr.'))
// )));

Option to add additional prefixes.

6.38. Additional suffixes

// Additional Suffix for the Contact name can be added by uncommenting and editing the following define.
// define('CONTACT_SUFFIX', json_encode(array(
//      array(_('A')),
//      array(_('B'))
// )));

Option to add additional suffixes.

6.39. Shared notifications polling time

// Define the polling interval in minutes for unread mail in shared stores.

Set the polling time (in minutes) for shared stores notifications.

6.40. Email Prefetch count

// Define the amount of emails to load in the background, in batches of 10 emails per request every 30 seconds
// until the defined amount of items is loaded. Setting this value to zero disables this feature.

Set the prefetch email count. Default is 10.

6.41. Email Prefetch interval

// Define the interval between loading of new emails in the background.

Set the prefetch email interval. Default is 30 (seconds).

6.42. Max execution time

// This sets the maximum time in seconds that is allowed to run before it is terminated by the parser.
ini_set('max_execution_time', 300); // 5 minutes

Max time a php script should run before you get an error 500.

6.43. Block size

// BLOCK_SIZE (in bytes) is used for attachments by mapi_stream_read/mapi_stream_write
define('BLOCK_SIZE', 1048576);

MAPI properties that contains lots of data, will be read/written in this block size.

6.44. Expires time

// Time that static files may exist in the client's cache (13 weeks)
define('EXPIRES_TIME', 60*60*24*7*13);

Time the static files are kept alive in the client cache.

6.45. Static File Max Lifetime

// Time that the state files are allowed to survive (in seconds)
// For filesystems on which relatime is used, this value should be larger then the relatime_interval
// for kernels 2.6.30 and above relatime is enabled by default, and the relatime_interval is set to
// 24 hours.
define('STATE_FILE_MAX_LIFETIME', 28*60*60);

The time the state files are allowed to survive server side. Default is 28 hours.

6.46. Attachment max lifetime

// Time that attachments are allowed to survive (in seconds)

Option to define the maximum lifetime of attachments.

6.47. User based logging

 *  Logging settings
 *  Possible LOG_USER_LEVEL values are:
 *  LOGLEVEL_OFF            - no logging
 *  LOGLEVEL_FATAL          - log only critical errors
 *  LOGLEVEL_ERROR          - logs events which might require corrective actions
 *  LOGLEVEL_WARN           - might lead to an error or require corrective actions in the future
 *  LOGLEVEL_INFO           - usually completed actions
 *  LOGLEVEL_DEBUG          - debugging information, typically only meaningful to developers
 *  The verbosity increases from top to bottom. More verbose levels include less verbose
 *  ones, e.g. setting to LOGLEVEL_DEBUG will also output LOGLEVEL_FATAL, LOGLEVEL_ERROR,
 *  LOGLEVEL_WARN and LOGLEVEL_INFO level entries.

// To save e.g. user activity data only for selected users, provide the username followed by semicolon.
// The data will be saved into a dedicated file per user in the LOG_FILE_DIR
// Users have to be encapsulated in quotes, several users are semicolon separated, like:
// define('LOG_USERS', 'user1;user2;user3');
define('LOG_USERS', '');

// Location to the log directory
// e.g /var/log/webapp-userslog/users/
define('LOG_FILE_DIR', '');

Create log files per user. By default the logging is disabled. The log file directory must be writable by the webserver.

6.48. location of language files

// Location to the translations
define("LANGUAGE_DIR", "server/language/");

Option to define the directory where the languages / translations are stored.

6.49. Default language and fallback language

// Defines the default interface language. This can be overriden by the user.
// This language is also used on the login page
if (isset($_ENV['LANG']) && $_ENV['LANG']!="C"){
        define('LANG', $_ENV["LANG"]); // This means the server environment language determines the web client language.
        define('LANG', 'en_GB'); // default fallback language

Define a default fallback language.

6.50. Enabled languages

// List of languages that should be enabled in the logon
// screen's language drop down.  Languages should be specified
// using <languagecode>_<regioncode>[.UTF-8], and separated with
// semicolon.  A list of available languages can be found in
// the manual or by looking at the list of directories in
// /usr/share/kopano-webapp/server/language .
define("ENABLED_LANGUAGES", "de_DE;en_GB;en_US;fr_FR;he_IL;it_IT;nl_NL;ru_RU;zh_CN;nb_NO;hu_HU");

list of enabled languages in WebApp.

6.51. Default timezone

// Defines the default time zone, change e.g. to "Europe/London" when needed
if(!ini_get('date.timezone')) {

Define the time zone used in WebApp.

6.52. Powerpaste options

// Options for TinyMCE's powerpaste plugin, see https://www.tinymce.com/docs/enterprise/paste-from-word/#configurationoptions
// for more details.
define('POWERPASTE_WORD_IMPORT', 'merge');
define('POWERPASTE_HTML_IMPORT', 'merge');

TinyMCE’s powerpaste options.

6.53. Display errors

// Do not log errors into stdout, since this generates faulty JSON responses.
ini_set("display_errors", false);

Display errors inside the WebApp. Default is false.

6.54. Log errors

ini_set("log_errors", true);

Enable logging of errors and specify what to log. Default is true and E_ERROR. Valid options are: E_ERROR, E_WARNING, E_PARSE, E_NOTICE.

6.55. Debug.php file

if (file_exists('debug.php')){
        // define empty dump function in case we still use it somewhere
        function dump(){}

Debug.php can be found in our repository: https://stash.kopano.io/projects/KW/repos/kopano-webapp/