Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する
Command Reference

blocklet server


The blocklet server command is the primary tool for managing the lifecycle of a Blocklet Server instance. This includes initializing a new server, starting and stopping the service, checking its status, and performing maintenance tasks such as upgrades and migrations.

All subcommands can be run with the -h or --help flag to display specific options.

Global Options#

These options can be used with any blocklet server subcommand.

Option

Description

-V, --version

Output the version number.

-c, --config [node-config]

Specifies the Blocklet Server configuration file to use.

-y, --yes

Automatically answers "yes" to any prompts. Default is false.

-h, --help

Display help information for the command.


init#

Initializes a new Blocklet Server configuration. This command sets up the necessary directories and configuration files for a new server instance.

Usage

blocklet server init [options]

Options

Option

Description

-f, --force

Initialize without asking any questions. Default: false.

-i, --interactive

Run in interactive mode. This is ignored if --force is used. Default: false.

--mode <mode>

Sets the initial server mode. Allowed values: production, debug. Default: production.

--https / --no-https

Enable or disable default HTTPS support for the dashboard and blocklets.

--sk <custom-sk>

Provide a custom secret key for the Blocklet Server.

--web-wallet-url <url>

Sets a custom URL for the web wallet. Defaults to the standard Blocklet web wallet.

--http-port <httpPort>

Specifies the HTTP port for the service gateway. Default: 80.

--https-port <httpsPort>

Specifies the HTTPS port for the service gateway. Default: 443.

--owner-nft-holder <ownerNftHolderDid>

The DID of the holder of the ownership NFT.

--owner-nft-issuer <ownerNftIssuerDid>

The DID of the issuer of the ownership NFT.

--trusted-passport-issuer <passportIssuerDid>

The DID of a trusted passport issuer for the node.

--disable-passport-issuance

Disables the node's ability to issue passports. Default: false.


start#

Starts the Blocklet Server daemon process using the existing configuration.

Usage

blocklet server start [options]

Options

Option

Description

-u, --update-db

Updates the Blocklet Server database with the latest settings from the config file.

--update-blocklet-env

Updates the environments for installed blocklets. Default: false.

-k, --keep-alive

Keeps the command running without exiting after a successful start. Default: false.

-a, --auto-init

If the configuration directory is missing, initialize it automatically before starting. Default: false.

-m, --force-mode <forceMode>

Forces the server to start in a specific mode. Allowed values: production, debug, etc.

--force-intranet

Forces the server to run in intranet mode, ignoring any external IP.


stop#

Stops the running Blocklet Server and all associated blocklet processes.

Usage

blocklet server stop [options]

Options

Option

Description

-f, --force

Forcefully stops all Blocklet Server related processes. Default: false.


status#

Displays the current status of the Blocklet Server and all installed blocklets.

Usage

blocklet server status [options]

Options

Option

Description

--force-intranet

Assumes an intranet environment when checking status.


logs#

Shows the file paths for Blocklet Server and blocklet log files.

Usage

blocklet server logs


upgrade#

Upgrades the Blocklet Server to the latest version.

Usage

blocklet server upgrade


info#

Retrieves environment information for debugging and issue reporting.

Usage

blocklet server info [options]

Options

Option

Description

-C, --clipboard

Automatically copies the environment information to the clipboard. Default: false.


cleanup#

Performs various cleanup tasks on the server.

Usage

blocklet server cleanup [options]

Options

Option

Description

--target <target>

Specifies what to clean. Available targets: cache, maintenance-status, blacklist, blacklist-expired.


migrate#

Migrates the Blocklet Server database from one dialect to another, for example, from SQLite to PostgreSQL.

Usage

blocklet server migrate [options]

Options

Option

Description

--dialect <dialect>

The target database dialect. Available options: sqlite, postgres.


Now that you understand how to manage the server instance, see the blocklet command reference to learn how to manage individual blocklets.