Instance customization

The functionality as well as the look-and-feel of an instance can be customized by creating a customize folder and copying assets to be customized (images, stylesheets, page templates, etc) from customize.dist into it. If a file exists in customize, it will be served to users instead of its namesake in customize.dist.

Note

The purpose of the customize directory is to make it easier to upgrade CryptPad while maintaining customizations in place. Occasionally, a major new version may introduce breaking changes or require adjustments in the customizations. Administrators with customized instances are therefore encouraged to read instructions carefully before each upgrade.

Application config

A wide range of settings are available in www/common/application_config_internal.js. To modify them:

  1. Make a copy of customize.dist/application_config.js in the customize folder.

  2. Copy the default value(s) to modify from www/common/application_config_internal.js into customize/application_config.js.

Restricting guest access

To disable unregistered use of CryptPad, add the following to customize/application_config.js:

AppConfig.registeredOnlyTypes = AppConfig.availablePadTypes;

Note

To close registration of new users on the instance, see Close registration in the admin panel.

Look and feel

To add a custom logo to the instance's homepage:

  1. Add the new logo to customize

  2. Copy customize.dist/pages/index.js to customize/pages/index.js

  3. In the copy, replace the image on this line with your custom logo.

Many other aspects of CryptPad's interface can be customized, for example the LESS color themes colortheme.less and colortheme-dark.less in customize.dist/src/less2/include/. As with all other elements, make a copy in customize and edit the values to override the defaults.

Translations

To customize the text of the CryptPad interface in a given language, copy customize.dist/messages.xx.js to customize/translations/messages.xx.js where xx is the locale of the language (use messages.js to customize English).

In this file, modify the default text using the "Messages" object as follows: Messages.key = "Text";. For all the keys and their associated text please see www/common/translations/messages.json or any of the messages.xx.json in the same directory for the translated text.

For example, to customize the text about the instance on the home page, the following could be pasted in customize/translations/messages.js and the text changed to describe the instance.

Messages.home_host = "This is an independent community instance of CryptPad.";

For more information on how translations work in CryptPad please see Translation keys in the developer guide.