How to start WildFly in read-only mode

Starting WildFly in read-only mode can be useful in situations where you want to restrict modifications to the server’s configuration and deployments while the server is running. Here’s a brief tutorial on how to start WildFly in read-only mode.

Read only mode configuration

You can follow these steps to start WildFly in read-only mode:

Download and Install WildFly: If you haven’t already, download and install WildFly on your system. You can get the latest version from the WildFly website.

Navigate to WildFly Directory: Open your terminal or command prompt and navigate to the directory where WildFly is installed. In most cases, you’ll be in the root WildFly directory.

Start WildFly in Read-Only Mode: To start WildFly in read-only mode, use the following command:

./standalone.sh --read-only-server-config=standalone.xml

Clearly, you can replace the configuration file with the configuration you want to use at start-up.

Server Output: After running the command, WildFly will start in read-only mode, and you will see server startup messages in the terminal. The server will use the standalone.xml configuration file specified in the command.

Access the Management Console: By default, you can access the WildFly management console at http://localhost:9990/console. However, in read-only mode, you won’t be able to make configuration changes through the console.

Alternatives to read-only configurations

Using containers, such as Docker containers, to define an immutable configuration for your applications can be a good alternative, especially in modern DevOps and microservices-oriented environments.

You can read the following tutorial to learn more about running WIldFly with Docker: How to run WildFly with Docker

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