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


Recommended Articles

Mastering Domain Mode Configuration for WildFly Application Server: From Elytron to Legacy

Discover how to configure WildFly's Domain mode with Elytron, including key components and steps. Learn about Host Controllers, Server Groups, and the latest configuration.

Read Properties from WildFly Configuration Directory with MicroProfile Config API and Pure Java

Learn how to read properties from WildFly configuration folder using MicroProfile Config API and a pure Java approach, along with example code and best practices.

Mastering JBoss CLI Scripts for Domain Mode Operations

Learn how to configure resources, reach server nodes, and manage server groups with JBoss CLI scripts in domain mode.

WildFly Embedded Mode for Command Line Interface - Simplified Configuration Management

Easily manage WildFly configurations offline with embedded mode. Learn how to use embed-server command and –server-config option for Cloud applications. #WildFlyCLI #JavaDev #CloudNative