In this tutorial, we will show you how to install WildFly on Ubuntu 22.04 LTS. For those of you who didn’t know, WildFly is a powerful, modular, and lightweight application server that helps you build amazing applications. It is cross-platform and comes with a sophisticated interface that makes changing application server settings and configuration very simple and quick. As of this writing, WildFly 26 is the latest release in a series of JBoss opensource application server offerings
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the WildFly (JBoss) on Ubuntu 22.04 (Jammy Jellyfish). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.
- A server running one of the following operating systems: Ubuntu 22.04, 20.04, and any other Debian-based distribution like Linux Mint.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install WildFly on Ubuntu 22.04 LTS Jammy Jellyfish
Step 1. First, make sure that all your system packages are up-to-date by running the following
apt commands in the terminal.
sudo apt update sudo apt upgrade sudo apt install wget apt-transport-https gnupg2 software-properties-common
Step 2. Installing Java.
WildFly requires a Java Standard Edition Runtime Environment (JRE) version 11 or later. Now run the following command to install OpenJDK:
sudo apt install default-jdk
Verify the installation:
Step 3. Installing WildFly on Ubuntu 22.04.
By default, WildFly is available on Ubuntu 22.04 base repository. Now run the following command below to download the latest stable version of WildFly to your Ubuntu system:
Next, extract the downloaded file:
tar -xf wildfly-26.1.1.Final.tar.gz
/opt directory, so that we don’t accidentally delete it:
sudo mv wildfly-26.1.1.Fina /opt/wildlfy
Now change the directory permissions to the user and group WildFly:
sudo chown -RH wildfly:wildfly /opt/wildfly
Step 4. Add WildFly Users.
Create a user and group for WildFly:
sudo groupadd -r wildfly sudo useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly
Step 5. Create WildFly Management Console and Application User.
We run a script to either configure the existing “
admin” user or create a new one. Just execute the given command below:
Step 6. Configure WildFly.
Now we create a WildFly directory which will store the configuration files in the
sudo mkdir -p /etc/wildfly
systemd service, configuration file, and start scripts templates from the
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/launch.sh /opt/wildfly/bin/
Then, make the scripts in the
/opt/wildfly directory executable:
sudo chmod +x /opt/wildfly/bin/*.sh
Now start and enable the Wildfly service on your Ubuntu system:
sudo systemctl enable --now wildfly sudo systemctl daemon-reload sudo systemctl start wildfly
Step 7. Configure WildFly Admin Console.
By default, you won’t be able to access the Admin interface. Now run a script to configure the existing “administrator” user or create a new one:
sudo nano /etc/wildfly/wildfly.conf
0.0.0.0 with 127.0.0.1 in the following line:
Step 8. Configure the Firewall.
If your server is protected by a firewall and you want to access the WildFly interface from the outside of your local network you need to open ports
sudo ufw allow 8080/tcp sudo ufw allow 9990/tcp
Step 9. Accessing WildFly Web Interface.
Once successfully installed, open your web browser and access the WildFly using the URL
https://your-IP-address:8080. You will be redirected to the WildFly page:
To access the Wildfly admin console type the URL
http://your-IP-address:9990/console in your web browser. You will be asked to provide an admin username and password as below:
Congratulations! You have successfully installed WildFly. Thanks for using this tutorial for installing the WildFly (JBoss) on Ubuntu 22.04 LTS Jammy Jellyfish system. For additional help or useful information, we recommend you check the official WildFly website.