RackNerd Billboard Banner

How to Install WildFly Application Server on Ubuntu

WildFly is a powerful, flexible, open-source application server for Java. If you’re looking to deploy enterprise Java applications, it’s one of the best tools you can use. Here’s a no-nonsense guide to installing WildFly on Ubuntu.

Prerequisites

Before you start, make sure you have:

  • A server or desktop running Ubuntu (20.04 or later recommended)
  • A user account with sudo privileges
  • Java (OpenJDK 11 or later)

Step 1: Install Java

WildFly requires Java. Run the following command to install OpenJDK 17 (the latest LTS as of writing):

sudo apt update
sudo apt install openjdk-17-jdk -y

Check your Java version:

java -version

Step 2: Create a WildFly User

It’s a good idea to run WildFly as a non-root user. Create a dedicated system user:

sudo useradd -r -m -U -d /opt/wildfly -s /bin/false wildfly

Step 3: Download and Extract WildFly

Go to WildFly Downloads and copy the latest download link.

For example, to download WildFly 30.0.0:

cd /tmp
wget https://github.com/wildfly/wildfly/releases/download/30.0.0.Final/wildfly-30.0.0.Final.tar.gz

Extract and move to /opt:

sudo tar xf wildfly-30.0.0.Final.tar.gz -C /opt/
sudo ln -s /opt/wildfly-30.0.0.Final /opt/wildfly
sudo chown -R wildfly:wildfly /opt/wildfly*

Step 4: Set Up Systemd Service

WildFly comes with example service scripts. Let’s set it up as a service:

  1. Copy the service file:
    sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/
  2. Edit the service file (optional, for custom paths):
    sudo nano /etc/systemd/system/wildfly.service
    (Usually the defaults are fine if you used the steps above.)
  3. Reload systemd:
    sudo systemctl daemon-reload

Step 5: Start and Enable WildFly

Start WildFly and enable it to launch on boot:

sudo systemctl start wildfly
sudo systemctl enable wildfly

Check the status:

sudo systemctl status wildfly

Step 6: Adjust the Firewall

If you want to access the management console or applications from the network, open the necessary ports (default HTTP is 8080):

sudo ufw allow 8080/tcp
sudo ufw allow 9990/tcp  # management console

Step 7: Access WildFly

Open your browser and go to:

http://<your-server-ip>:8080

You should see the WildFly welcome page.


Step 8: Secure the Management Console

To manage WildFly from the browser, create a management user:

sudo /opt/wildfly/bin/add-user.sh

Follow the prompts to set username, password, and role.


Final Thoughts

That’s it—WildFly is up and running on Ubuntu! You’re ready to deploy Java EE or Jakarta EE applications. For production environments, always review WildFly’s security and performance settings.

Have questions or need more guides? Drop them in the comments below!

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
RackNerd Billboard Banner
© 2025 Computer Everywhere
Your Everyday Guide to the Digital World.
Terms of Service | Privacy Policy
Copy link