How to Install WildFly on windows
Enjoying this content? Subscribe to the Channel!
Get Your Application Server Running: Installing WildFly on Windows Server (2016/10 Guide)
Welcome to Darren’s Tech Tutorials!
Hello and welcome back to the channel! Today, we are diving into one of the most powerful and widely used Java application servers: WildFly. If you’re familiar with the Java ecosystem, you might remember it by its former name, JBoss AS. Developed by Red Hat, WildFly is a high-performance, lightweight server that fully implements the Java Platform, Enterprise Edition (Java EE) specification.
In this practical, step-by-step tutorial, we’ll walk you through setting up WildFly on a Windows environment. While our primary focus is on Windows Server 2016, these steps are nearly identical for Windows 10 or newer desktop versions.
By the end of this guide, you will have WildFly installed, tested, secured with a management user, and configured to run automatically as a Windows Service—the perfect setup for production or serious development!
Step 1: Installing Java (JRE) on Windows
WildFly is written in Java and requires a compatible Java Runtime Environment (JRE) installed on your system to function. This is the critical first step before we introduce the application server itself.
- Download Java: Visit the official Oracle or OpenJDK website and download the latest stable version of the JRE (or JDK, if you plan on doing active development on the server).
- Run the Installer: Execute the downloaded installer and follow the prompts. We recommend accepting the default installation path.
- Verify the Installation: Open Command Prompt and type
java -version. You should see the version information displayed, confirming Java is correctly installed and accessible on your path.
Step 2: Downloading the WildFly Application Server
With Java ready, we can now fetch the WildFly zip package. WildFly is designed for portability, so installation simply means downloading and extracting the files.
- Navigate to the Downloads Page: Go to the official WildFly website (or search for “WildFly download”).
- Download the Latest Stable Release: Download the compressed ZIP file for the latest version of WildFly.
- Extract the Files: Once the download is complete, extract the entire contents of the ZIP file to a stable, easily accessible location on your server. A common location is
C:\wildfly. For the purposes of this guide, we will assume this path.
Step 3: Running WildFly in Standalone Mode (First Test)
Before we commit to setting up the server permanently, it’s vital to perform a quick test to ensure the environment variables and the core server components are working correctly. We do this by launching WildFly in standalone mode.
- Open Command Prompt: Navigate to the WildFly directory you created in the previous step.
- Execute the Standalone Script: Change directory to the
binfolder within your WildFly installation (e.g.,C:\wildfly\bin). - Start the Server: Execute the following batch file:
standalone.bat - Verification: Watch the console output. You should see numerous startup messages. Once the server is ready, look for a message indicating the server is running and is bound to HTTP port 8080.
- Test in Browser: Open your web browser and navigate to
http://localhost:8080. You should see the default WildFly welcome page. - Stop the Server: Once verified, return to the Command Prompt and press
Ctrl+Cto shut down the server.
Step 4: Securing Your Server: Adding a Management User
While the server is running, the management interface (used to deploy applications and change settings) is not secured by default. To access the powerful web console, we need to create a dedicated management user.
-
Launch the Add-User Utility: From the
C:\wildfly\bindirectory, run the utility script:add-user.bat -
Follow Prompts:
- Select option a for “Management User” (not application user).
- Enter a secure username (e.g.,
admin). - Enter and confirm a strong password.
- When prompted about the user belonging to groups, just press Enter.
- Confirm the creation of the user.
-
Access the Management Console:
- Restart the WildFly server using
standalone.bat(as in Step 3). - In your browser, navigate to the management console port:
http://localhost:9990. - Enter the management credentials you just created. You should now have full administrative access!
- Restart the WildFly server using
Step 5: Finalizing the Setup: Installing WildFly as a Windows Service
For a robust, reliable installation—especially on a production server—WildFly must run automatically in the background. Installing it as a Windows Service ensures it starts immediately upon server boot and runs independently of any logged-in user.
WildFly comes equipped with the necessary scripts to handle this process effortlessly.
-
Stop the Server: Ensure WildFly is not running (if you left it running from Step 4, press
Ctrl+Cin the command window). -
Install the Service: Navigate back to the
C:\wildfly\bindirectory. Execute the following script:service install -
Start the Service: Once the service is successfully installed, you can start it immediately using the command:
net start WildFlyAlternatively, you can manage the service via the standard Windows Services Management console.
-
Confirm Operation: Check the Windows Services application to ensure the service is running, and confirm you can still access
http://localhost:8080and the management interface athttp://localhost:9990.
You’re All Set!
Congratulations! You have successfully installed and configured the WildFly Application Server on your Windows machine, secured the management interface, and set it up as a resilient background service. You are now ready to start deploying your Java EE applications and leveraging the power of this robust platform.
If this guide helped you get your server running, please take a moment to like this post and subscribe to Darren’s Tech Tutorials for more clear, actionable guides like this one. If you ran into any issues, leave a comment below—I’m always happy to help!
Happy coding!