blocklet server
The blocklet server command is the primary tool for managing the lifecycle and configuration of your Blocklet Server instance. It allows you to initialize, start, stop, and monitor the server and all the blocklets running on it. These commands are essential for server administrators and developers who are self-hosting Blocklet Server.
For managing individual blocklets (e.g., creating, developing, deploying), see the blocklet command reference.
Usage#
Basic Usage
blocklet server <command> [options]Global Options#
These options can be used with any blocklet server subcommand.
Commands#
init#
Initializes a new Blocklet Server configuration in the current directory. This command creates the necessary files and folders, including the main config.yml file.
Usage#
blocklet server init [options]Options#
start#
Starts the Blocklet Server as a background daemon process based on the configuration in the current directory.
Usage#
blocklet server start [options]Options#
stop#
Stops the running Blocklet Server and all associated blocklet processes gracefully.
Usage#
blocklet server stop [options]Options#
status#
Checks and displays the current status of the Blocklet Server, including its mode, data directory, and the status of all installed blocklets.
Usage#
blocklet server status [options]Options#
logs#
Shows the file paths for Blocklet Server and individual blocklet log files for easy access and debugging.
Usage#
blocklet server logsupgrade#
Upgrades the Blocklet Server CLI to the latest available version from the npm registry.
Usage#
blocklet server upgradeinfo#
Gathers and displays environment information useful for debugging and reporting issues. This includes OS, binaries (Node, npm), server configuration, and network details.
Usage#
blocklet server info [options]Options#
cleanup#
Performs various server-level cleanup tasks.
Usage#
blocklet server cleanup [options]Options#
Specifies the cleanup target. Available options are: cache, maintenance-status, blacklist, blacklist-expired.
migrate#
Migrates the Blocklet Server database from one system to another. Currently supports migration from SQLite to PostgreSQL.
Usage#
blocklet server migrate [options]Options#
The database dialect to migrate to. Available options are sqlite and postgres.
nginx#
Configures Nginx as a reverse proxy for Blocklet Server. This is useful for production environments where Nginx can handle tasks like SSL termination and load balancing.
Usage#
blocklet server nginx [options]