Configuration

There are a few ways to configure your AFFiNE deployment.

Admin Panel

In the Admin Panel (<your-affine.domain>/admin/settings), you can use a GUI to update available configuration options. Each option is documented in the interface.

AFFiNE Admin Panel configuration settings
NOTE

Any configuration saved in the Admin Panel takes effect immediately. No restart is required.

Config File

Besides the Admin Panel, AFFiNE also supports importing configuration through the command line. Use this approach when you cannot access the Admin Panel but still have access to the host or Docker container.

1. Create a JSON config file

JSON Schema

If you are editing the config JSON file in an editor such as VS Code, JSON language support can read the schema and help you write the config file correctly.

config.json
{
  "$schema": "https://github.com/toeverything/affine/releases/latest/download/config.schema.json",
  "server": {
    "name": "My Magical AFFiNE Server"
  }
}

Configuration JSON schema example

2. Put the config file on your host

If you followed the official Docker Compose setup, put this config file at {CONFIG_LOCATION}/config.json.

Restart your deployment with docker compose up -d and the config file will be applied automatically.


If you use a custom deployment, upload or mount this config file to your instance before continuing.

3. Optional - Import the config

ssh into your host and execute the following command from the directory of the AFFiNE compiled assets.

# Make sure you are at the directory of affine compiled assets.
# pwd should output something like /root/app.
node ./dist/data/index.js import-config ./path/to/config.json

Restart your instance after importing the config so the changes take effect.