start
Starts the Blocklet Server daemon and all its related services. This command is the primary way to bring your Blocklet Server instance online based on its configuration.
Before starting the server, ensure you have an initialized configuration. If not, please see the server init command. To stop a running server, use server stop.
Usage#
blocklet server start [options]Options#
Option | Description |
|---|---|
| Forces the server's database to be updated with the settings from the configuration file ( |
| Initializes a new Blocklet Server instance in the current directory if one doesn't already exist, then starts it. This streamlines the setup process for new instances. |
| Forces the server to run in intranet mode, ignoring any external IP addresses. |
| Starts the server in a specific mode, such as |
| Keeps the CLI process attached to the server after it starts. This is particularly useful for environments like Docker, where the container exits if the primary process finishes. When this flag is used, the CLI will continue running and will exit only when the Blocklet Server stops. |
Startup Process#
The start command executes a series of steps to ensure the server and its components are launched correctly and in the right order.
Key Concepts#
Configuration Synchronization#
Blocklet Server maintains its configuration in two places: the blocklet.yml file and an internal database. When the server starts, it compares these two sources. If it detects any differences, it will print a warning table.
$ blocklet server start
⚠️ We found that there are some differences between config file and database
┌──────────────────┬─────────────────┬──────────┐
│ Name │ Configuration │ Database │
├──────────────────┼─────────────────┼──────────┤
│ didDomain │ new.domain.com │ old.domain.com │
└──────────────────┴─────────────────┴──────────┘
ℹ️ If you want to update the database, restart node with --update-db flagTo apply the changes from blocklet.yml to the database, use the --update-db flag:
blocklet server start --update-dbVersion Compatibility#
To ensure stability, the CLI checks if its version is compatible with the version specified in the server's configuration file. It follows semantic versioning rules, allowing minor and patch updates but preventing major version mismatches. If a mismatch occurs, the command will fail with an error message, prompting you to install a compatible CLI version.
This check can be skipped by setting the environment variable ABT_NODE_SKIP_VERSION_CHECK=true, but this is not recommended for production environments.
Automatic Initialization#
If you are setting up a new server, the --auto-init flag simplifies the process by combining initialization and starting into a single command. If a configuration file is not found in the current directory, it will be created automatically before the server starts.
# In a new, empty directory
mkdir my-node && cd my-node
# Initialize and start the server in one go
blocklet server start --auto-initTroubleshooting#
If the server fails to start, the command will output an error message. For more details, check the daemon's error log file. The location of this file can be found using the server logs command. A common location is ~/.abtnode/logs/daemon.stderr.log.
After a failed start, some processes might be left running. You can perform a clean stop using:
blocklet server stop --forceAfter successfully starting the server, you can check its status with server status or view logs with server logs.