How to Install WildFly (JBoss) on Ubuntu 24.04
Step-by-step tutorial on how to install WildFly on Ubuntu 24.04 LTS. Setup OpenJDK 21, systemd service, administrative console, and security.

6 min read
Step-by-step tutorial on how to install WildFly on Ubuntu 24.04 LTS. Setup OpenJDK 21, systemd service, administrative console, and security.
- Prerequisites and Supported Releases
- Step 1: Updating System and Installing OpenJDK 21
- Step 2: Creating a Dedicated WildFly System User
WildFly (formerly known as JBoss Application Server) is a high-performance, modular, open-source Java application server developed and maintained by Red Hat. Compliant with the latest Jakarta EE specifications and MicroProfile standards, WildFly powers mission-critical enterprise applications with rapid boot times, lightweight memory consumption, dynamic classloading, and comprehensive clustering capabilities.
For enterprise Java developers and systems administrators transitioning legacy JBoss workloads or deploying new microservices, WildFly provides a production-grade container runtime. Learning how to install wildfly on ubuntu 24.04 gives you a modern enterprise application environment integrated with Ubuntu's long-term support release and systemd daemon management.
In this comprehensive step-by-step tutorial, we demonstrate how to install WildFly on Ubuntu 24.04 LTS (Noble Numbat). We cover installing OpenJDK 21, creating an unprivileged service user, extracting WildFly into /opt/wildfly, configuring a systemd background service, creating administrative management users, and securing the web management console.
Install and configure the Red Hat WildFly (formerly JBoss) Java EE / Jakarta EE application server on Ubuntu 24.04 LTS with OpenJDK 21, systemd, and secure admin console access.
Prerequisites and Supported Releases
This guide is thoroughly verified on Ubuntu 24.04 LTS (Noble Numbat). The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.
Before proceeding, ensure you have the following requirements satisfied:
- A server or virtual machine running
Ubuntu 24.04 LTS. - A user account with
sudoadministrative privileges. - At least
2 GB of RAM(4 GB recommended for production enterprise application deployments). - Inbound access to port
8080(application port) and port9990(management console) in your firewall.
Step 1: Updating System and Installing OpenJDK 21
WildFly requires a compatible Java Virtual Machine (JVM). Modern WildFly releases (such as WildFly 33 and 34) are fully optimized to run on Java 17 and Java 21 LTS, leveraging modern JVM garbage collectors and virtual threads.
OpenJDK 21 LTS delivers long-term enterprise stability, superior memory management with the Z Garbage Collector (ZGC) and G1GC, and high throughput for concurrent Jakarta EE HTTP requests.
Update your local package lists and install OpenJDK 21 Development Kit and file extraction tools using APT.
Verify the installed Java version to confirm that the runtime is available.
# Update package index
sudo apt update && sudo apt upgrade -y
# Install OpenJDK 21 and extraction utilities
sudo apt install -y openjdk-21-jdk curl wget tar
# Verify active Java version
java -version
Step 2: Creating a Dedicated WildFly System User
For security reasons, WildFly should never execute as the root user. Create a dedicated system user and group named wildfly.
This account will own the WildFly binaries, configuration files, and deployment runtime folders.
Set the home directory to /opt/wildfly with a disabled password.
# Create dedicated system group and user
sudo groupadd -r wildfly
sudo useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly
Step 3: Downloading and Extracting WildFly
Download the latest stable release archive of WildFly from the official WildFly website or GitHub repository into your /tmp directory.
Extract the archive into /opt/ and create a symbolic link named /opt/wildfly pointing to the extracted release directory.
Using a symbolic link makes future version upgrades seamless without modifying service unit files.
# Download latest stable WildFly tarball
cd /tmp
WILDFLY_VERSION="33.0.2.Final"
wget https://github.com/wildfly/wildfly/releases/download/${WILDFLY_VERSION}/wildfly-${WILDFLY_VERSION}.tar.gz
# Extract into /opt
sudo tar -xzf wildfly-${WILDFLY_VERSION}.tar.gz -C /opt/
# Create symbolic link to /opt/wildfly
sudo ln -sf /opt/wildfly-${WILDFLY_VERSION} /opt/wildfly
# Assign ownership to wildfly user
sudo chown -R wildfly:wildfly /opt/wildfly /opt/wildfly-${WILDFLY_VERSION}
Step 4: Configuring WildFly Systemd Service
WildFly conveniently includes production-ready configuration scripts and systemd unit files inside its docs/contrib/scripts/systemd directory.
Create a dedicated configuration directory at /etc/wildfly and copy the template configuration file.
The wildfly.conf file governs the execution mode (standalone vs domain), runtime configuration XML file (standalone.xml), and process user.
Then copy the launch script and systemd service definition file into place.
# Create configuration directory
sudo mkdir -p /etc/wildfly
# Copy default configuration file
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/
# Copy launch script to /opt/wildfly/bin/
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/launch.sh /opt/wildfly/bin/
sudo chmod +x /opt/wildfly/bin/launch.sh
# Copy systemd unit file
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/
Step 5: Starting and Enabling the WildFly Service
Reload the systemd daemon to register the new unit file.
Enable WildFly to start automatically at boot, and start the service.
Verify that the service is running and active.
# Reload systemd and start WildFly
sudo systemctl daemon-reload
sudo systemctl enable --now wildfly
# Check service status
sudo systemctl status wildfly --no-pager
Step 6: Creating an Administrative User
WildFly includes a management script called add-user.sh located in /opt/wildfly/bin/ to create administrative and application users.
Run the script to create a Management User with access to the web administration console.
Select Management User (a), enter an administrator username (such as admin), and configure a strong password.
# Execute administrative user creation utility
sudo -u wildfly /opt/wildfly/bin/add-user.sh
# Follow prompts: Select 'a' for Management User, specify username and password
Step 7: Enabling Remote Access to the Management Console
By default, WildFly binds its administration interface (port 9990) strictly to 127.0.0.1 (localhost) for security. To access the management console remotely, configure the management interface binding in your environment.
Administrative credentials are stored in hash format inside mgmt-users.properties under /opt/wildfly/standalone/configuration/, ensuring credentials are never exposed in plaintext.
Open /etc/wildfly/wildfly.conf and change the WILDFLY_CONSOLE_BIND directive to 0.0.0.0.
Restart the WildFly service to apply the configuration.
# Open configuration file
sudo nano /etc/wildfly/wildfly.conf
# Set console binding to all network interfaces:
# WILDFLY_CONSOLE_BIND=0.0.0.0
# Restart WildFly daemon
sudo systemctl restart wildfly
Step 8: Configuring Firewall and Accessing the Admin Console
Configure UFW to permit incoming connections on port 8080 (application HTTP port) and port 9990 (management console).
For maximum security, restrict port 9990 strictly to your trusted administrative IP address.
Open your web browser and navigate to http://your_server_ip:8080 to view the WildFly welcome page.
Navigate to http://your_server_ip:9990 and authenticate using your management credentials to access the full administrative dashboard.
You can also manage the application server from the command line using the JBoss Management CLI tool: /opt/wildfly/bin/jboss-cli.sh --connect.
# Allow application traffic
sudo ufw allow 8080/tcp
# Allow management console from specific IP
sudo ufw allow from 203.0.113.50 to any port 9990 proto tcp
# Connect via JBoss Management CLI
/opt/wildfly/bin/jboss-cli.sh --connect
Troubleshooting and Common Errors
When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:
WildFly service fails to start or times out
Resolution: Check the server logs located at /opt/wildfly/standalone/log/server.log. Ensure OpenJDK 21 is installed and verify that /opt/wildfly is owned by wildfly:wildfly.
Management console at port 9990 returns 'Connection Refused'
Resolution: Ensure WILDFLY_CONSOLE_BIND=0.0.0.0 is configured in /etc/wildfly/wildfly.conf, and verify that UFW or cloud security groups allow inbound TCP port 9990.
Deployments fail due to Java heap space errors
Resolution: Increase the Java memory arguments in /opt/wildfly/bin/standalone.conf by modifying -Xms and -Xmx (e.g., -Xms1024m -Xmx2048m) and restarting WildFly.
Security Best Practices and Hardening
Never expose the WildFly management port (9990) to the open internet without strict IP whitelisting or an SSH tunnel.
Always execute WildFly under the unprivileged wildfly service user, never as root.
Enforce TLS encryption on production endpoints using an Nginx reverse proxy with Let's Encrypt SSL.
Regularly review /opt/wildfly/standalone/log/audit.log to audit administrative actions and configuration changes.
Related Ubuntu Tutorials and Documentation
Deepen your Linux system administration skills with our related production-tested guides:
Authoritative References and Official Documentation

The Linux Command Line, 2nd Edition: A Complete Introduction
Frequently Asked Questions
Quick answers to common questions and configurations
.war file directly into /opt/wildfly/standalone/deployments/ or through the web administration console under the Deployments tab./opt/wildfly-X.Y.Z, update the symbolic link /opt/wildfly to point to the new directory, migrate your standalone.xml configuration, and restart the service.Editorial Disclosure: Website Vidya is supported by our readers. When you purchase hosting, tools, or software through our verified partner links, we may earn an affiliate commission at no extra cost to you. We only recommend solutions we trust and rigorously verify.
Rajesh Ray
I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.
Most Read Guides
TrendingUbuntu Server Not Booting? 10 Simple Steps to Fix It Fast
How to Create a 3D Button in HTML and CSS: Easy Steps
How to Install Python and Pip on Ubuntu 24.04 LTS
How to Install Nginx on Ubuntu 24.04
How to Install Python on Ubuntu 24.04 LTS
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides


Join the Conversation & Perspective
Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.
No comments on this guide yet. Be the first to share your thoughts or ask a question!