WildFly Java Application Server on AlmaLinux 9 (Systemd + Nginx + SSL)

WildFly (formerly JBoss AS) is a lightweight, high-performance, and enterprise-ready Java application server that supports Jakarta EE (Java EE), REST APIs, messaging, clustering, and microservices architectures. It’s designed with a modular runtime that delivers fast startup times, reduced memory footprint, and the flexibility to scale from small applications to enterprise workloads.

Running WildFly on AlmaLinux 9 — a RHEL-compatible enterprise distribution — gives you a secure, stable, and long-term supported platform with SELinux enforcement, hardened libraries, and enterprise-grade lifecycle management. This combination is ideal for organizations that want reliability, security, and compliance without vendor lock-in.


Architecture Overview

LayerComponentRole
OSAlmaLinux 9RHEL-compatible enterprise OS with SELinux enforcement
RuntimeOpenJDK 17 / 21 (LTS)Runs WildFly application server and deployed apps
ApplicationWildFly (Jakarta EE server)Provides APIs, clustering, and services for Java applications
Process ManagersystemdKeeps WildFly running as a managed background service
Reverse ProxyNginx (recommended)TLS termination, routing, load balancing, compression
TLSLet’s Encrypt / PKIProvides secure HTTPS for applications and admin console

Why Use WildFly?

  • Full Jakarta EE support – ideal for enterprise Java applications.
  • High-performance runtime – modular, efficient, and optimized for production.
  • Deployment flexibility – standalone mode for simplicity or domain mode for clusters.
  • Enterprise security – RBAC, TLS, LDAP/AD integration, SELinux hardening.
  • Built-in clustering – load balancing, failover, and high availability.

WildFly vs Other Java Servers

Feature/CapabilityWildFlyTomcatPayara / GlassFishJetty
Jakarta EE supportFull (complete spec)Partial (Servlet/JSP)FullPartial (Servlets, WebSockets)
Clustering & HAYesLimitedYesLimited
Modular designYesLightweight coreLess modularLightweight core
Management consoleYes (web + CLI)NoYesNo

WildFly is best suited when you need enterprise-grade Java features and clustering, while Tomcat and Jetty are better for lightweight servlet-based apps.


Security & Best Practices

  • Create a dedicated WildFly system user instead of running as root.
  • Manage WildFly with systemd for uptime and service reliability.
  • Place WildFly behind Nginx with SSL for secure HTTPS access.
  • Keep WildFly and OpenJDK updated to supported LTS releases.
  • Harden the management console with strong credentials, firewall rules, and SELinux.
  • Use role-based access control (RBAC) and consider LDAP/AD for enterprise integration.

Typical Use Cases

  • Hosting enterprise Jakarta EE applications.
  • Deploying REST/SOAP APIs for distributed systems.
  • Running clustered, high-availability platforms.
  • Supporting microservices and modular Java apps.
  • Acting as a middleware backbone for corporate environments.

1. Create a Shape.Host VPS Instance

Log in at https://shape.host.

Click “Create” → “Instance”.

Shape.host Resources dashboard with Create > Instance highlighted.

Select your preferred server location.

Shape.host instance form with the data center location selector highlighted.

Choose AlmaLinux 9 (64-bit) as the operating system.

Pick a plan with at least 2 CPUs, 4 GB RAM, and 20 GB SSD.

Shape.host instance form with the operating system image selector highlighted.

Click “Create Instance”.

Shape.host instance form with the Create Instance button highlighted.

Copy the server IP address from the Resources section.

Shape.host Resources dashboard with the server IP address highlighted.

2. Connect to Your VPS

On Linux/macOS

ssh root@your-server-ip

On Windows

  • On Windows 10/11 PowerShell: ssh root@your-server-ip
  • On older Windows, download PuTTY and connect with your root credentials.

3. Install Java

Update packages:

dnf update
Terminal showing DNF/YUM package management commands and output.

Install OpenJDK 17 (required for WildFly 37):

dnf install java-17-openjdk java-17-openjdk-devel
Terminal showing DNF/YUM package management commands and output.

Verify installation:

java -version
Terminal showing java commands or output during Install Java.

4. Create WildFly User and Directory

Add a system group and user:

groupadd -r wildfly
useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly
Terminal showing Linux user account management commands.

5. Download and Extract WildFly

Download WildFly:

wget https://github.com/wildfly/wildfly/releases/download/37.0.0.Final/wildfly-37.0.0.Final.tar.gz -P /tmp
Terminal showing file download commands and transfer output.

Extract it to /opt:

tar xf /tmp/wildfly-37.0.0.Final.tar.gz -C /opt/

Create a symlink:

ln -sfn /opt/wildfly-37.0.0.Final /opt/wildfly

Set ownership:

chown -RH wildfly:wildfly /opt/wildfly*
Terminal showing file ownership or permission commands.

6. Configure WildFly as a System Service

Create configuration directory:

mkdir -p /etc/wildfly

Copy systemd files:

cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/
cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/
cp /opt/wildfly/docs/contrib/scripts/systemd/launch.sh /opt/wildfly/bin/

Make the script executable and fix ownership:

chmod +x /opt/wildfly/bin/launch.sh
chown -R wildfly:wildfly /opt/wildfly

Reload systemd and start WildFly:

systemctl daemon-reload
systemctl enable --now wildfly
Terminal showing systemd service management commands or output.

7. Create Admin User

Run the built-in user creation script:

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

Follow the prompts to create a management user for the admin console.

Terminal showing sh commands or output during Create Admin User.

8. Configure WildFly Bind Addresses

Edit standalone configuration:

nano /opt/wildfly/standalone/configuration/standalone.xml

Find this section:

<interfaces>
    <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>
</interfaces>

Change it to:

<interfaces>
    <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>
</interfaces>
WildFly configuration excerpt defining network bind addresses.

Restart WildFly:

systemctl restart wildfly

Check status:

systemctl status wildfly
Terminal showing systemd service management commands or output.

9. Access WildFly

Now you can access:

  • Application URL: http://<server-IP>:8080
  • Admin Console: http://<server-IP>:9990

Log in with the admin user credentials you created earlier.

Browser authentication prompt for the WildFly console.
WildFly application server welcome page.

This tutorial was tested on a Shape.Host Linux SSD VPS.

With Shape.Host, you get:

  • Global high-performance VPS hosting
  • Full OS support: AlmaLinux, Rocky Linux, Ubuntu, Debian
  • Instant scaling of CPU, RAM, and storage
  • Built-in snapshots, backups, and monitoring

Start today at https://shape.host and deploy WildFly in minutes.