How To Run Wildfly on CentOS 7

Published: December 1, 2025 (Updated: Dec 1, 2025)

Enjoying this content? Subscribe to the Channel!

How to Install and Run WildFly Application Server on CentOS 7: The Complete Guide

Hey there! This is Darren from Darren’s Tech Tutorials, and I’m excited to walk you through setting up a powerful Java EE application environment.

WildFly, formerly recognized as the widely used JBoss Application Server (or JBoss AS), is a robust, open-source application server developed by Red Hat. It’s written in Java and implements the latest Java Platform, Enterprise Edition (Java EE) specifications, making it the perfect backbone for enterprise applications.

In this tutorial, we are going to dive deep into installing, configuring, and running WildFly on a CentOS 7 machine. By the time we’re done, you’ll have a fully functional WildFly instance accessible across your network.

Let’s get started!


Step 1: Install OpenJDK and Configure the Firewall

Before we can download WildFly, we need the Java runtime environment and we must ensure our firewall allows external access to the application server ports.

A. Install OpenJDK

WildFly requires Java to run. We will install OpenJDK 8 using yum.

sudo yum -y install java-1.8.0-openjdk

Once the installation is complete, confirm the installation by checking the version:

java -version

You should see output confirming Java 1.8 (or similar) is installed. Perfect!

B. Configure Firewall Rules

We need to open two critical ports: 8080 (the standard web port) and 9990 (the management interface port).

# Open the standard web application port (8080)
sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent

# Open the WildFly management port (9990)
sudo firewall-cmd --zone=public --add-port=9990/tcp --permanent

# Reload the firewall to apply changes
sudo firewall-cmd --reload

You should receive a success message for each of these commands.


Step 2: Download and Unpack WildFly

Now that our prerequisites are met, let’s grab the WildFly package.

Note: The version linked below was current at the time of recording (14.0.1), but always check the official WildFly website for the latest stable release.

A. Download the Tarball

We will use the wget command to download the compressed WildFly archive:

sudo wget http://download.jboss.org/wildfly/14.0.1.Final/wildfly-14.0.1.Final.tar.gz

B. Unpack the Archive

Use the tar command to extract the contents of the downloaded file:

sudo tar -zxvf wildfly-14.0.1.Final.tar.gz

C. Navigate to the Directory

Change into the newly created WildFly directory structure:

cd wildfly-14.0.1.Final

Step 3: Configure WildFly for Network Access

By default, WildFly is bound only to localhost (127.0.0.1). This means you can’t access it from any external machine—only from the server itself. To make it available to your network, we need to modify the standalone.xml configuration file to bind to all available IP addresses (0.0.0.0).

A. Locate the Configuration File

First, navigate to the configuration directory:

cd standalone/configuration/

B. Edit standalone.xml

We will use the vi editor to make the required changes.

vi standalone.xml

Once inside vi, search for the <interfaces> section. You can type /interfaces and hit Enter to jump directly there. This should bring you to the area around line 492.

You need to change the binding address from 127.0.0.1 to 0.0.0.0 for both the management and public interfaces.

Original Lines (Look for these):

<interface name="management">
    <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
...
<interface name="public">
    <inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>

Modified Lines (Change 127.0.0.1 to 0.0.0.0):

<interface name="management">
    <inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
</interface>
...
<interface name="public">
    <inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>

Save and exit vi by pressing Escape, then typing :wq! and hitting Enter.


Step 4: Adding a Management User

WildFly uses a special user account to access the administration console on port 9990. We must create this user using the included script.

A. Navigate to the Bin Directory

Move back up into the bin directory where the utility scripts are stored:

cd ../../bin

B. Run the Add User Script

Execute the script ./add-user.sh. We will use a simple user and password for testing purposes, but remember to use strong credentials in a production environment!

./add-user.sh

Follow the prompts as shown below:

Prompt Input/Action Notes
What type of user do you wish to add? a (Management User) This is the default.
Realm: ManagementRealm Press Enter (default).
Username: wildfly Use any desired username.
Password: wildfly Warning: Use a secure password in production!
Re-enter Password: wildfly
User will be added to file… y
What groups do you want the user to belong to? (Leave blank) Press Enter.
Add this user to the ManagementRealm? y
Is this new user going to be used as a slave host controller? n

You should get a confirmation that the user was successfully added.


Step 5: Start WildFly and Verification

We are now ready to launch the application server!

A. Start the Standalone Instance

From the bin directory, run the standalone.sh script:

./standalone.sh

WildFly will take a few moments to initialize. Once it’s finished, you should see a line confirming that the server is started:

WildFly 14.0.1.Final (WildFly Core 6.0.2.Final) started in XXXXms - Started

B. Verify in the Browser

Open your web browser and navigate to your CentOS machine’s IP address. Be sure to substitute [Your_IP_Address] with the actual IP of your server.

1. Check the Default Web Port (8080):

Navigate to: http://[Your_IP_Address]:8080

If successful, you should see the official WildFly “Welcome” page. Fantastic!

2. Check the Management Console (9990):

Navigate to: http://[Your_IP_Address]:9990

This should prompt you for a username and password. Enter the management credentials you created in Step 4 (e.g., wildfly and wildfly).

Upon successful login, you will be taken to the beautiful WildFly management dashboard! This confirms that your application server is fully configured and running correctly.


Conclusion

You have successfully installed OpenJDK, configured your firewall, downloaded, configured, and launched the WildFly application server on CentOS 7!

You are now running a powerful Java EE server ready to host your enterprise applications. While we ran WildFly interactively here, in a later tutorial, I’ll show you how to configure WildFly to run as a proper service so it starts automatically upon boot—essential for production environments.

If you encountered any issues along the way, drop a comment below, and I’ll be happy to help you troubleshoot.

If you found this tutorial helpful, please be sure to like, share, and subscribe to Darren’s Tech Tutorials for more clear, step-by-step guides! Thanks for watching!