Stop Server
The blocklet server stop command safely shuts down a running Blocklet Server instance. This process includes stopping all associated blocklet applications, the routing engine, and core server services.
Standard Stop#
By default, the command initiates a graceful shutdown. It notifies connected web dashboard users, stops each running blocklet individually, and then shuts down the main server components. This ensures a clean exit and data integrity.
blocklet server stopUpon successful execution, you will see output confirming that each component has been stopped:
✔ Sending shutdown notification to web dashboard users Done
✔ Routing engine is stopped successfully
✔ Blocklet My-Blocklet is stopped successfully
✔ daemon is stopped successfully
✔ service is stopped successfully
✔ event-hub is stopped successfully
✔ Docker containers managed by blocklet server are stopped
✔ Done!Important: Development Mode Conflict#
The standard stop command cannot proceed if any blocklet is running in development mode (i.e., started with blocklet dev). This is a safety measure to prevent accidental termination of an active development session. If you attempt to stop the server in this state, you will receive the following error:
ERROR Unable to stop Blocklet Server, please stop the development by pressing Ctrl + C in the terminal of My-BlockletTo resolve this, navigate to the terminal where the development blocklet is running, press Ctrl + C to stop it, and then run blocklet server stop again.
Force Stop#
If the standard stop command fails, hangs, or the server becomes unresponsive, you can use the --force flag. This method is more aggressive and bypasses the graceful shutdown sequence, directly terminating all processes associated with Blocklet Server.
Use this option with caution, as it does not give blocklets a chance to shut down cleanly.
blocklet server stop --forceShutdown Logic#
The following diagram illustrates the decision-making process when stopping the server:
Options#
Option | Description |
|---|---|
| Forcefully stops all Blocklet Server related processes, bypassing the graceful shutdown procedure. |
To verify the server has stopped, you can use the blocklet server status command. See Check Status for more information.