server run command

Starts the named Open Liberty server as a foreground process.

The standard output and error from the server process are output to the foreground.

Usage examples

Start the myserver server in the foreground:

server run myserver

Start the myserver server in the foreground and set the variable_name variable to the variable_value value:

server run myserver -- --variable_name=variable_value


Run the command from the path_to_liberty/bin directory.

server run serverName [options]

The name of the server to run the command against. If no server is specified, a server called defaultServer is automatically created to run the command against.


One or more optional parameters.


Option Description


Defines variables. Include -- in the command before you specify the option, as shown in the usage example.

Variables that are specified on the command line override all other sources of variables and can’t be changed after the server starts.

Exit codes

The following exit codes are available for the server run command and the equivalent executable JAR file ws-server.jar:


OK. 0 indicates successful completion of the requested operation.


1 indicates invocation of a redundant operation, such as starting a started server or stopping a stopper server. 1 might also be returned if the JVM options that were used are not valid.


2 indicates that the server does not exist.


Exit codes greater than or equal to 20 indicate that an error occurred while performing the request. Messages are printed and captured in log files with more information about the error.

Unresolved include directive in modules/reference/pages/command/server-run.adoc - include::server-serverprocess.adoc[]