How to start/stop Servers and ServerGroups from the CLI

Here is a quick tip: How to start or stop all servers belonging to a WildFly Server Group using the Command Line Interface.

Connect to the Command Line Interface:

$ ./jboss-cli.sh -c

Now in order to stop all server groups in “main-server-group”:

/server-group=main-server-group:stop-servers

Conversely, to start all server groups in the “main-server-group”_

/server-group=main-server-group:start-servers

On the other hand, if you want to start a single Server node:

/host=local/server-config=server-one:start

Finally, if you want to stop a single Server node:

/host=local/server-config=server-one:stop

To learn mode about Domain management, check this tutorial:

Example: How to stop just “server-one”: How to manage a WildFly / JBoss EAP Domain

Found the article helpful? if so please follow us on Socials