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

WildFly (formerly JBoss AS) is a lightweight, high-performance, and enterprise-ready Java application server that supports the full Jakarta EE (Java EE) stack, RESTful services, clustering, messaging, and microservices. Its modular architecture delivers fast startup times, optimized memory usage, and flexible scalability, making it one of the most popular Java platforms for enterprise-grade deployments.

Running WildFly on Rocky Linux 9 — a community-driven, RHEL-compatible enterprise operating system — provides a secure, stable, and long-term supported foundation. With SELinux enforcement, hardened libraries, and regular security updates, Rocky Linux ensures reliability and compliance, making it an excellent choice for running production Java applications.


Architecture Overview

LayerComponentRole
OSRocky Linux 9RHEL-compatible enterprise base with SELinux enforced security
RuntimeOpenJDK 17 / 21 (LTS)Runs WildFly application server and deployed Java apps
ApplicationWildFly (Jakarta EE server)Provides APIs, clustering, and services for enterprise apps
Process ManagersystemdManages WildFly as a persistent background service
Reverse ProxyNginx (recommended)TLS termination, HTTP/2, load balancing, and routing
TLSLet’s Encrypt / PKIProvides secure HTTPS for applications and admin console

Why Use WildFly?

  • Enterprise-ready – full Jakarta EE support with clustering and microservices features.
  • Performance-focused – modular design, efficient memory usage, and fast startup.
  • Deployment flexibility – standalone mode for simplicity or domain mode for clusters.
  • Strong security – RBAC, TLS, LDAP/AD integration, and SELinux protection.
  • Scalable – built-in clustering for high availability and distributed deployments.

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 the right choice when you need a complete Jakarta EE application server with clustering and enterprise integrations, while Tomcat or Jetty are best for lightweight servlet-based deployments.


Security & Best Practices

  • Run WildFly under a dedicated system user for security.
  • Manage the service with systemd for reliability and controlled restarts.
  • Use Nginx as a reverse proxy with SSL for secure public access.
  • Keep OpenJDK and WildFly updated to supported LTS releases.
  • Protect the management console with firewall rules and strong credentials.
  • Leverage RBAC and consider LDAP/AD integration for enterprise use.
  • Enable SELinux policies and Rocky Linux firewall (firewalld) for extra hardening.

Typical Use Cases

  • Deploying enterprise Jakarta EE applications.
  • Running REST/SOAP backend services.
  • Building clustered, high-availability Java environments.
  • Supporting microservices and modular architectures.
  • Acting as a secure middleware backbone in enterprise environments.

1. Create a Shape.Host VPS Instance

Log in to 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 Rocky Linux 9 (64-bit) as the operating system.

Pick a VPS 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 versions, download PuTTY and log in as root.

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.

Check Java version:

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

4. Create WildFly User and Directory

Create 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 Install WildFly

Download WildFly 37:

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:

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

Create a symlink for easier upgrades:

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

Fix ownership:

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

6. Configure WildFly as a Systemd Service

Create config directory:

mkdir -p /etc/wildfly

Copy service 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 set 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 script to create an admin user:

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

Follow the prompts to set username and password.

Terminal showing sh commands or output during Create Admin User.

8. Configure WildFly Network Access

Edit the standalone configuration:

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

Find:

<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 to allow external connections:

<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

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

Log in with the admin user credentials you created.

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:

  • High-performance VPS servers across global data centers
  • OS support: Rocky Linux, AlmaLinux, Ubuntu, Debian
  • Instant scalability of CPU, RAM, and storage
  • Snapshots, backups, and monitoring included

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