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
Layer | Component | Role |
---|---|---|
OS | Rocky Linux 9 | RHEL-compatible enterprise base with SELinux enforced security |
Runtime | OpenJDK 17 / 21 (LTS) | Runs WildFly application server and deployed Java apps |
Application | WildFly (Jakarta EE server) | Provides APIs, clustering, and services for enterprise apps |
Process Manager | systemd | Manages WildFly as a persistent background service |
Reverse Proxy | Nginx (recommended) | TLS termination, HTTP/2, load balancing, and routing |
TLS | Let’s Encrypt / PKI | Provides 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/Capability | WildFly | Tomcat | Payara / GlassFish | Jetty |
---|---|---|---|---|
Jakarta EE support | Full (complete spec) | Partial (Servlet/JSP) | Full | Partial (Servlets, WebSockets) |
Clustering & HA | Yes | Limited | Yes | Limited |
Modular design | Yes | Lightweight core | Less modular | Lightweight core |
Management console | Yes (web + CLI) | No | Yes | No |
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”.

Select your preferred server location.

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.

Click “Create Instance”.

Copy the server IP address from the Resources section.

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

Install OpenJDK 17 (required for WildFly 37):
dnf install java-17-openjdk java-17-openjdk-devel

Check Java version:
java -version

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

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

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*

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

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.

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>

Restart WildFly:
systemctl restart wildfly
Check status:
systemctl status wildfly

9. Access WildFly
- Application:
http://<server-IP>:8080
- Admin Console:
http://<server-IP>:9990
Log in with the admin user credentials you created.


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.