In this blog post, we will discuss the steps used to Install WildFly (JBoss) Server on CentOS 8 / CentOS 7.  WildFly formerly known as JBoss is an application server written in Java and developed by Red Hat. It is an exceptionally fast, lightweight and powerful implementation of the Java Enterprise Edition 8 Platform specifications.

Setup Pre-requisites

  • CentOS / RHEL 8 or CentOS / RHEL 7 server
  • Java runtime environment
  • User with sudo or root access
  • Internet connection on your Server

Step 1: Install Java

Java is required on the server that will run WildFly Application Server. Use our guides below to install Java on CentOS / RHEL 7&8.

How to Install Java 11 (OpenJDK 11) on RHEL / CentOS 8

How to Install Java 11 on CentOS 7

If you want to go with Java 8, then just run the commands below to install it.

sudo yum install java-1.8.0-openjdk-devel

You can check the default Java version in your machine using:

$ java --version
openjdk version "11-ea" 2018-09-25
OpenJDK Runtime Environment (build 11-ea+28)
OpenJDK 64-Bit Server VM (build 11-ea+28, mixed mode, sharing)

Step 2: Download WildFly

Check WildFly Downloads page for latest releases before downloading the file. Here we will download WildFly 18.0.1.Final.

sudo yum -y install wget
export WILDFLY_RELEASE="18.0.1"

Once the file is downloaded, extract it.

tar xvf wildfly-$WILDFLY_RELEASE.Final.tar.gz

Move resulting folder to /opt/wildfly.

sudo mv wildfly-$WILDFLY_RELEASE.Final/ /opt/wildfly

Step 3: Configure Systemd for WildFly

Let’s now create a system user and group that will run WildFly service.

sudo groupadd --system wildfly
sudo useradd -s /sbin/nologin --system -d /opt/wildfly -g wildfly wildfly

Create WildFly configurations directory.

sudo mkdir /etc/wildfly

Copy WildFly systemd service, configuration file and start scripts templates from the /opt/wildfly/docs/contrib/scripts/systemd/ directory.

sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/ /opt/wildfly/bin/
sudo chmod +x /opt/wildfly/bin/

Set /opt/wildfly permissions.

sudo chown -R wildfly:wildfly /opt/wildfly

Reload systemd service.

sudo systemctl daemon-reload

Configure SELinux:

sudo semanage fcontext  -a -t bin_t  "/opt/wildfly/bin(/.*)?"
sudo restorecon -Rv /opt/wildfly/bin/

Start and enable WildFly service:

sudo systemctl start wildfly
sudo systemctl enable wildfly

Confirm WildFly Application Server status.

$ systemctl status wildfly
● wildfly.service - The WildFly Application Server
Loaded: loaded (/etc/systemd/system/wildfly.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2019-04-03 16:22:58 EAT; 6s ago
Main PID: 31303 (
Tasks: 119 (limit: 11510)
Memory: 330.8M
CGroup: /system.slice/wildfly.service
├─31303 /bin/bash /opt/wildfly/bin/ standalone standalone.xml
├─31304 /bin/sh /opt/wildfly/bin/ -c standalone.xml -b
└─31396 java -D[Standalone] -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djbos>
Apr 03 16:22:58 rhel8.local systemd[1]: Started The WildFly Application Server.

Service should bind to port 8080.

# ss -tunelp | grep 8080
tcp LISTEN 0 128* users:(("java",pid=6854,fd=389)) uid:999 ino:30339 sk:3 <->

Step 4: Add WildFly Users

WildFly 16 is now distributed with security enabled for the management interfaces. We need to create a user who can access WildFly administration console or remotely use the CLI. A script is provided for managing users.

Run it by executing the command:

sudo /opt/wildfly/bin/

You will be asked to choose type of user to add. Since this the first user, we want to make it admin. So choose a.

What type of user do you wish to add? 
a) Management User (
b) Application User (

Provide desired username for the user.

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : computingforgeeks

Set password for the user:

Password recommendations are listed below. To modify these restrictions edit the configuration file.
The password should be different from the username
The password should not be one of the following restricted values {root, admin, administrator}
The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
Password : <Enter Password>
Re-enter Password : <Confirm Password>

Press enter and agree to subsequent prompts to finish user creation.

What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]: <Enter>
About to add user 'computingforgeeks' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'computingforgeeks' to file '/opt/wildfly/standalone/configuration/'
Added user 'computingforgeeks' to file '/opt/wildfly/domain/configuration/'
Added user 'computingforgeeks' with groups to file '/opt/wildfly/standalone/configuration/'
Added user 'computingforgeeks' with groups to file '/opt/wildfly/domain/configuration/'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition

Notice that:

User information is kept on: /opt/wildfly/domain/configuration/
Group information is kept on: /opt/wildfly/standalone/configuration/

Step 5: Accessing WildFly Admin Console

To be able to run WildFly scripts from you current shell session, add /opt/wildfly/bin/ to your $PATH.

cat >> ~/.bashrc <<EOF
export WildFly_BIN="/opt/wildfly/bin/"
export PATH=\$PATH:\$WildFly_BIN

Source the bashrc file.

source ~/.bashrc

Now test by connecting to WildFly Admin Console from CLI with jboss-cli.shcommand.

# --connect
[[email protected]:9990 /] version
JBoss Admin Command-line Interface
JBOSS_HOME: /opt/wildfly
Release: 8.0.0.Final
Product: WildFly Full 16.0.0.Final
JAVA_HOME: /usr/lib/jvm/java-11-openjdk-11.0.ea.28-8.el8.x86_64
java.version: 11-ea
java.vm.vendor: Oracle Corporation
java.vm.version: 11-ea+28 Linux
os.version: 4.18.0-32.el8.x86_64

Accessing WildFly Admin Console from Web Interface

By default, the console is accessible on localhost IP on port 9990.

# ss -tunelp | grep 9990
tcp    LISTEN   0    50* users:(("java",pid=6769,fd=404)) uid:999 ino:30407 sk:3 <-> 

We can start it on a different IP address accessible from outside the local server. Edit /opt/wildfly/bin/ to look like this:

if [[ "$1" == "domain" ]]; then
$WILDFLY_HOME/bin/ -c $2 -b $3
$WILDFLY_HOME/bin/ -c $2 -b $3 -bmanagement=

We added -bmanagement= to start script line. This binds “management” interface to all available IP addresses.

Restart wildfly service

sudo systemctl restart wildfly


$ ss -tunelp | grep 9990
tcp LISTEN 0 50* users:(("java",pid=9496,fd=320)) uid:999 ino:73367 sk:c <->

Open ports on firewall

sudo firewall-cmd --permanent --add-port={8080,9990}/tcp
sudo firewall-cmd --reload

Open your browser and URL http://serverip:9990 to access WildFly Web console.

wildfly console login rhel centos8

Use username created earlier and password to authenticate. WildFly console will be the next window to show.

wildfly web console

You have successfully installed WildFly Application server on RHEL / CentOS 8/7. Visit WildFly Documentation page for further reading.

If you’re an Ubuntu / Debian user, check: Install WildFly (JBoss) Application Server on Ubuntu 18.04 / Debian 10/9

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here