Skip to content

02 1. Control config

Naoki Kosaka edited this page Jun 29, 2025 · 3 revisions

Control Activity-Relay

config command

The config command manages relay configurations and imports/exports them via JSON files.

$ relay control config
Enable/disable relay customization and import/export relay database.

Usage:
   control config [command]

Available Commands:
  disable     Disable relay configuration
  enable      Enable relay configuration
  export      Export all relay information
  import      Import all relay information
  list        List all relay configurations

Flags:
  -h, --help   help for config

Global Flags:
  -c, --config string   Path of config (default "config.yml")
  -v, --verbose         Show debug log

Use " control config [command] --help" for more information about a command.

enable command

Specify the option you want to enable in the argument.

$ relay control config enable
Enable relay configuration.
 - person-only
        Blocking feature for service-type actor.
 - manually-accept
        Enable manually accept follow request.

Usage:
   control config enable [flags]

Flags:
  -h, --help   help for enable

Global Flags:
  -c, --config string   Path of config (default "config.yml")
  -v, --verbose         Show debug log

Example

  • Enable person-only mode.

    $ relay control config enable person-only

disable command

Specify the option you want to disable in the argument.

$ relay control config disable
Disable relay configuration.
 - person-only
        Blocking feature for service-type actor.
 - manually-accept
        Enable manually accept follow request.

Usage:
   control config disable [flags]

Flags:
  -h, --help   help for disable

Global Flags:
  -c, --config string   Path of config (default "config.yml")
  -v, --verbose         Show debug log

Example

  • Disable person-only mode.

    $ relay control config disable person-only

list command

Show current relay configurations.

$ relay control config list
List all relay configurations.

Usage:
   control config list [flags]

Flags:
  -h, --help   help for list

Global Flags:
  -c, --config string   Path of config (default "config.yml")
  -v, --verbose         Show debug log

Example

  • Show current configurations.

    $ relay control config list
    Person-Type Actor limitation: false
    Manual follow request acceptance: false

export command

Export all relay database for backup or migration to another instance. The data is dumped to stdout.

$ relay control config export
Export all relay information by JSON format.

Usage:
   control config export [flags]

Flags:
  -h, --help   help for export

Global Flags:
  -c, --config string   Path of config (default "config.yml")
  -v, --verbose         Show debug log

import command

Import all relay database from a JSON string (created by the export command).

$ relay control config import
Import all relay information from JSON.

Usage:
   control config import [flags]

Flags:
      --data string   JSON String
  -h, --help          help for import

Global Flags:
  -c, --config string   Path of config (default "config.yml")
  -v, --verbose         Show debug log

Example

  • Import from JSON String.

    $ relay control config import --data '{"relayConfig":{"blockService":true,"manuallyAccept":true},"limitedDomains":["limited.example.com"],"blockedDomains":["blocked.example.com"],"subscriptions":[{"domain":"subscriber.example.com","inbox_url":"https://subscriber.example.com/inbox","activity_id":"https://subscriber.example.com/UUID","actor_id":"https://subscriber.example.com/users/example"}]}'

Clone this wiki locally