Red Hat JBoss EAP 8.1 base on Rocky Linux 8 on AWS User Guide
Overview
This guide covers launching and using the Red Hat JBoss EAP 8.1 base on Rocky Linux 8 | cloudimg AMI on Amazon EC2, sold on AWS Marketplace as its own listing, which sells one product, Red Hat JBoss EAP 8.1 base on Rocky Linux 8.
This image contains no Red Hat software and includes no Red Hat subscription. It is a fully patched Rocky Linux 8 (compatible with Red Hat Enterprise Linux 8) server, locked down and prepared for Red Hat JBoss Enterprise Application Platform (JBoss EAP) 8.1. You install JBoss EAP 8.1 yourself, with your own active Red Hat subscription that includes JBoss EAP, using the installer helper on the image. The helper downloads JBoss EAP from Red Hat with your Red Hat service account, checks it against the SHA-256 checksum Red Hat publishes, and applies cloudimg's secure-by-default configuration. Your Red Hat credentials are used once and never stored. JBoss EAP then runs under the terms of your agreement with Red Hat. The price and the licence terms are under Licensing and price near the end of this guide.
The cloudimg image adds:
- An installer helper,
cloudimg-install-jboss-eap. It downloads JBoss EAP 8.1 from the Red Hat Downloads API with your Red Hat service account (the same API Red Hat's own Ansible collection for JBoss EAP uses), or installs a zip you downloaded from the Red Hat Customer Portal, verifies the checksum, unpacks it into/opt/jboss-eapand starts it as a systemd service. - HTTPS on port 8443 from the moment EAP is installed. First boot creates a TLS key and certificate unique to your instance, for its public DNS name, inside a PKCS12 keystore with its own password. The helper wires it into EAP's HTTPS listener (TLS 1.2 and 1.3) and removes the default keystore that EAP ships with the password
password. - A management password unique to your instance. First boot generates the password of the EAP management user
adminand writes it to/root/jboss-eap-credentials.txt(readable by root only). No password is baked into the image. - Management on localhost only. The management console and CLI (ports 9990 and 9993), the plain HTTP listener (8080) and every other EAP socket listen on
127.0.0.1. Only HTTPS 8443 is reachable from the network; you reach the console through an SSH tunnel. - No demo content. The welcome page and the example H2 datasource (
ExampleDS, usersa) are removed. - Locked-down defaults. EAP runs as the unprivileged
jbossuser in a systemd sandbox that can write only itsstandalonedirectory, and the server code belongs to root. Thejbossuser is blocked from the instance metadata service (169.254.169.254) by a firewalld rule, so an application flaw cannot be turned into a theft of instance role credentials; the AMI requires IMDSv2. SELinux stays enforcing, the firewall allows only SSH and 8443, SSH is key only with root login disabled, and the kernel and network settings are tightened. - Fail closed. The EAP service refuses to start until first boot has created the keystore and the password and EAP has been installed by the helper with its per instance administrator.
- Fully patched Rocky Linux 8.10 at build time (kernel 4.18.0-553.184.1, OpenJDK 21.0.13), with daily automatic security updates (they also keep OpenJDK patched).
What is on the image: Rocky Linux 8.10, OpenJDK 21 (java-21-openjdk-headless, a JDK that JBoss EAP 8.1 supports), firewalld, cloud-init, the AWS Systems Manager agent and the cloudimg tools. /opt/jboss-eap is empty until you install JBoss EAP.
Default user: rocky · Architecture: x86_64 · Recommended instance type: m5.large · Root volume: 11 GB gp3
The listing offers x86_64 instance types across the general purpose (T, M), compute optimised (C), memory optimised (R, X, Z, U), storage optimised (D, H, I) and accelerated computing (G, P, Inf, Trn) families, all at the same software charge per vCPU.
Prerequisites
- An active Red Hat subscription that includes Red Hat JBoss Enterprise Application Platform, and a Red Hat service account in that organisation (a client ID and client secret, created in Step 5). Without them the image can still be launched, but JBoss EAP cannot be downloaded. If you need an open source Jakarta EE server with no Red Hat subscription, use WildFly, the upstream project of JBoss EAP, instead.
- An AWS account subscribed to the listing, an EC2 key pair and a subnet with outbound HTTPS to the internet (the instance downloads EAP from
sso.redhat.comandapi.access.redhat.com). - A security group that allows TCP 22 (SSH) from your own IP and, once EAP is installed, TCP 8443 (your applications over HTTPS) from your own networks only. The security group the listing suggests opens SSH only, from anywhere: change its source to your own IP, and add the 8443 rule yourself. Never open 9990, 9993 or 8080.
Step 1: Launch the instance
Open the Red Hat JBoss EAP 8.1 base on Rocky Linux 8 | cloudimg listing on AWS Marketplace and choose View purchase options, then Subscribe. Once the subscription is active, choose Launch your software, then Launch from EC2 Console (or One-click launch from AWS Marketplace) and your Region. Choose the Version whose name is Red Hat JBoss EAP 8.1 base on Rocky Linux 8 followed by the date and UTC time the build was added (as YYYY-MM-DD HH:MM); if more than one such version is offered, choose the newest. Choose m5.large (or larger for your applications), your key pair and a security group as above.
With the AWS CLI (replace the values in angle brackets):
aws ec2 run-instances --image-id <ami-id> --instance-type m5.large \
--key-name <your-key-pair> --security-group-ids <your-security-group> --subnet-id <your-subnet> \
--metadata-options HttpTokens=required,HttpEndpoint=enabled \
--tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=jboss-eap-81}]'
Step 2: Connect over SSH
ssh -i <your-key.pem> rocky@<public-ip>
The login message names the image and the installer helper.
Step 3: Check first boot and your instance's values
First boot runs once, within a minute of launch. It creates the management password, the keystore password and the HTTPS keystore:
sudo systemctl status jboss-eap-firstboot --no-pager | head -4
sudo grep -oE '^[A-Z_]+=' /root/jboss-eap-credentials.txt
sudo grep -E '^JBOSS_EAP_(HOSTNAME|HTTPS_URL|ADMIN_USER|MANAGEMENT_URL|TLS_STORE|STATUS)=' /root/jboss-eap-credentials.txt
Example output:
● jboss-eap-firstboot.service - cloudimg Base for Red Hat JBoss EAP: per-instance management password and HTTPS keystore
Loaded: loaded (/etc/systemd/system/jboss-eap-firstboot.service; enabled; vendor preset: disabled)
Active: active (exited) since Sun 2026-11-15 20:46:44 UTC; 7min ago
Process: 968 ExecStart=/usr/local/sbin/cloudimg-jboss-eap-firstboot (code=exited, status=0/SUCCESS)
JBOSS_EAP_HOSTNAME=
JBOSS_EAP_HTTPS_URL=
JBOSS_EAP_ADMIN_USER=
JBOSS_EAP_ADMIN_PASSWORD=
JBOSS_EAP_MANAGEMENT_URL=
JBOSS_EAP_TLS_STORE=
JBOSS_EAP_KEYSTORE_PASSWORD=
JBOSS_EAP_STATUS=
JBOSS_EAP_HOSTNAME=ec2-54-89-7-214.compute-1.amazonaws.com
JBOSS_EAP_HTTPS_URL=https://ec2-54-89-7-214.compute-1.amazonaws.com:8443/
JBOSS_EAP_ADMIN_USER=admin
JBOSS_EAP_MANAGEMENT_URL=http://127.0.0.1:9990/
JBOSS_EAP_TLS_STORE=/etc/cloudimg/jboss-eap/tls/server.p12
JBOSS_EAP_STATUS=not installed - run: sudo cloudimg-install-jboss-eap
The host name comes from the instance's EC2 metadata (public DNS name, else public IP, else private IP), never from a request. To use your own DNS name, see Step 9. Print the management password only when you need it: sudo grep '^JBOSS_EAP_ADMIN_PASSWORD=' /root/jboss-eap-credentials.txt | cut -d= -f2-.
Step 4: Run the preflight check
The preflight check needs no credentials. It confirms first boot, the keystore, Java, the firewall, SELinux, available disk space and that the instance can reach Red Hat:
sudo cloudimg-install-jboss-eap --preflight
Preflight (cloudimg Base for Red Hat JBoss EAP 8.1):
PASS first boot completed (per-instance password and keystore)
PASS per-instance HTTPS keystore /etc/cloudimg/jboss-eap/tls/server.p12 opens with its own password
PASS OpenJDK 21 (21.0.13)
PASS jboss system user present
PASS firewalld active, 8443/tcp open
PASS SELinux enforcing
PASS 6592 MiB free for /opt/jboss-eap
PASS Red Hat SSO reachable (sso.redhat.com, HTTP 401 without credentials)
PASS Red Hat Downloads API reachable (api.access.redhat.com, HTTP 401 without credentials)
If a Red Hat endpoint fails, allow outbound HTTPS (TCP 443) to sso.redhat.com and api.access.redhat.com in your network ACLs, proxy or NAT gateway.
sudo cloudimg-install-jboss-eap --status
java -version 2>&1 | head -1
getenforce
JBoss EAP: not installed (/opt/jboss-eap is empty). Run: sudo cloudimg-install-jboss-eap --preflight
HTTPS: https://ec2-54-89-7-214.compute-1.amazonaws.com:8443/ management: http://127.0.0.1:9990/ (loopback only)
openjdk version "21.0.13" 2026-10-20 LTS
Enforcing
Step 5: Create a Red Hat service account
The helper authenticates to Red Hat with a service account of the Red Hat organisation that holds your JBoss EAP subscription:
- Sign in to the Red Hat Hybrid Cloud Console at
console.redhat.comas an organisation administrator. - Open the Service Accounts page (from the gear icon, under Identity & Access Management) and choose Create service account. Give it a name such as
eap-downloads-aws. - Copy the Client ID and Client secret. Red Hat shows the secret only once.
The service account belongs to the organisation that holds the JBoss EAP subscription and must be allowed to download its software; your organisation administrator manages its access in User Access. Red Hat documents service accounts and their use with its downloads in the Hybrid Cloud Console help and in the README of its redhat.eap Ansible collection. Delete or rotate the service account when you no longer need it.
Step 6: Install JBoss EAP 8.1 with your subscription
Option A: answer two prompts (recommended). The secret is not echoed, and it never reaches your shell history:
sudo cloudimg-install-jboss-eap
# Red Hat service account client ID: <your-client-id>
# Red Hat service account client secret (hidden): <your-token>
Option B: a credentials file. Create a root-only file, put the two values in it with an editor, and pass it to the helper. The helper refuses a file other users can read and shreds it after reading (add --keep-credentials-file to keep it):
sudo install -m 600 /dev/null /root/rh-service-account.txt
sudo vi /root/rh-service-account.txt
# client_id=<your-client-id>
# client_secret=<your-token>
sudo cloudimg-install-jboss-eap --credentials-file /root/rh-service-account.txt
Option C: a zip you downloaded yourself. Download Red Hat JBoss Enterprise Application Platform 8.1.0 (jboss-eap-8.1.0.zip) from the Red Hat Customer Portal (Downloads, JBoss Enterprise Application Platform, version 8.1), note the SHA-256 checksum shown on the download page, copy the zip to the instance and install it:
scp -i <your-key.pem> jboss-eap-8.1.0.zip rocky@<public-ip>:/tmp/
sudo cloudimg-install-jboss-eap --archive /tmp/jboss-eap-8.1.0.zip --sha256 <sha256-from-portal>
rm -f /tmp/jboss-eap-8.1.0.zip
To see which EAP 8.1 files your subscription can download, run sudo cloudimg-install-jboss-eap --list, and pick one with --file-name.
What the helper does, in order:
- Exchanges your service account for a short-lived access token at
sso.redhat.com. The token stays in memory and is sent only to Red Hat hosts. - Finds
jboss-eap-8.1.0.zipin the Red Hat Downloads API, downloads it and compares its SHA-256 with the checksum Red Hat publishes for it. A mismatch deletes the file and stops. - Checks that the archive is JBoss EAP 8.1 and unpacks it into
/opt/jboss-eap(server code owned by root, runtime directories owned byjboss). - Applies cloudimg's configuration to
standalone.xmlwith the JBoss CLI: the HTTPS listener on 0.0.0.0:8443 uses your instance's keystore (TLS 1.2 and 1.3); the public and management interfaces are pinned to 127.0.0.1; EAP's default keystore, the welcome content andExampleDSare removed; web service WSDL addresses use your configured host name over HTTPS. - Creates the management user
adminwith the password from/root/jboss-eap-credentials.txt. - Enables and starts
jboss-eap.service, and checks that HTTPS answers and that the management interface accepts the password.
If Red Hat does not accept the service account, the helper stops before downloading anything and prints, for example:
ERROR: Red Hat SSO refused the service account (invalid_client: Invalid client or Invalid client credentials). Check the client ID and secret at console.redhat.com -> Service Accounts; nothing was downloaded or stored.
Step 7: Use JBoss EAP
After the install, check the service and the listeners:
sudo cloudimg-install-jboss-eap --status
sudo systemctl status jboss-eap --no-pager | head -5
sudo ss -ltn
Only port 22 and port 8443 listen on the network; 8080, 9990 and the other EAP ports listen on 127.0.0.1.
Your applications over HTTPS. From your computer (the certificate is self-signed for your instance, so a browser shows a warning until you add your own certificate, see Step 9):
curl -k https://<public-dns-name>:8443/
A fresh server answers 404 Not Found because the welcome page is removed. Deploy an application by copying it into the deployments directory as the jboss user, or with the management CLI:
sudo install -o jboss -g jboss -m 0640 myapp.war /opt/jboss-eap/standalone/deployments/
sudo /opt/jboss-eap/bin/jboss-cli.sh --connect --controller=127.0.0.1:9990 --command="deployment-info"
The management console. Open an SSH tunnel from your computer, then browse to http://localhost:9990/ and sign in as admin with the password from /root/jboss-eap-credentials.txt:
ssh -i <your-key.pem> -L 9990:127.0.0.1:9990 rocky@<public-ip>
Settings. JVM options go in /etc/sysconfig/jboss-eap (for example JAVA_OPTS="-Xms1g -Xmx2g"), followed by sudo systemctl restart jboss-eap. The server runs standalone.xml. To change the HTTPS port or open the HTTP listener, edit the configuration with the JBoss CLI and open the port in both your security group and firewalld (sudo firewall-cmd --permanent --add-port=<port>/tcp && sudo firewall-cmd --reload).
Step 8: Keep EAP and the operating system patched
- Rocky Linux and OpenJDK:
dnf-automaticinstalls security updates daily. Runsudo dnf -y upgradefor all updates, and restart EAP after a Java update (sudo systemctl restart jboss-eap). - JBoss EAP: apply Red Hat's EAP 8.1 updates as described in Red Hat's guide Updating Red Hat JBoss Enterprise Application Platform (the management CLI
installer updatecommands or thejboss-eap-installation-manager), with your subscription.
Step 9: Use your own host name or certificate
To issue the instance certificate for your own DNS name (for example after pointing a Route 53 record at the instance), run:
sudo cloudimg-jboss-eap-tls --hostname eap.example.com
The tool records the name in /etc/cloudimg/jboss-eap-hostname, mints a new key and certificate into the keystore and, when EAP is installed, restarts it and updates the WSDL host. To use a certificate from your own certificate authority, import it into a PKCS12 keystore and point the cloudimgKS key store in standalone.xml at it, or put an Application Load Balancer with an AWS Certificate Manager certificate in front of port 8443.
Firewall and security model
sudo firewall-cmd --list-services
sudo firewall-cmd --list-ports
sudo ss -ltn
systemctl show -p UnitFileState jboss-eap
dhcpv6-client ssh
8443/tcp
State Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 128 [::]:22 [::]:*
UnitFileState=disabled
| Port | Listens on | Purpose |
|---|---|---|
| 22 | all interfaces | SSH, key only, user rocky |
| 8443 | all interfaces | your applications over HTTPS (after EAP is installed) |
| 8080 | 127.0.0.1 | EAP plain HTTP (loopback only) |
| 9990, 9993 | 127.0.0.1 | EAP management console and CLI |
| 4712, 4713 | 127.0.0.1 | EAP transactions |
jboss-eap.service stays disabled until the helper installs EAP. The jboss user cannot reach the instance metadata service: firewalld rejects its traffic to 169.254.169.254 with an owner-match rule (sudo firewall-cmd --direct --get-all-rules lists it). The service unit also carries IPAddressDeny for it, but Rocky Linux 8 runs the legacy cgroup v1 hierarchy, on which systemd cannot enforce that setting, so the firewalld rule is the control that blocks it: keep it in place. If an application genuinely needs AWS credentials, give it explicit credentials (or a sidecar) rather than relaxing this rule.
The SSH settings (key only, no root login, no password or X11 and agent forwarding, at most 4 authentication attempts) are set directly in /etc/ssh/sshd_config. To change one, edit that file, then run sudo sshd -t && sudo systemctl reload sshd.
Uninstall or reinstall
sudo cloudimg-install-jboss-eap --uninstall stops and disables the service and removes /opt/jboss-eap, including deployments and data, and returns the instance to its base state. Your keystore and management password stay, so you can install again.
Troubleshooting
first boot has not completed: checksudo journalctl -u jboss-eap-firstboot. The instance needs IMDSv2 to read its host name, or a name in/etc/cloudimg/jboss-eap-hostname.Red Hat SSO refused the service account: the client ID or secret is wrong, or the service account was deleted. Create a new secret in the Hybrid Cloud Console.the Red Hat Downloads API refused this service account: the organisation's subscription does not include JBoss EAP, or the account cannot download it. Ask your Red Hat account team, or use Option C with a zip from the Customer Portal.jboss-eap start refused: the service refuses to start without first boot, an install by the helper and a per instance administrator; the message names what is missing.- The service does not start after you edited the configuration:
sudo journalctl -u jboss-eap -n 100and/opt/jboss-eap/standalone/log/server.log.
Support
cloudimg's support team is on hand 24 hours a day by email for this image, with a guaranteed response within 24 hours: launch and first login, first boot and the per-instance credentials, the installer helper, SSH, firewalld, SELinux and dnf updates.
- Email: support@cloudimg.co.uk
- Website: www.cloudimg.co.uk/support
- User Guides: www.cloudimg.co.uk/guides
Questions about JBoss EAP itself, its updates and your subscription go to Red Hat under your subscription.
Licensing and price
Red Hat JBoss EAP is not included in this image. You install it with your own active Red Hat subscription that includes JBoss EAP, and it runs under your agreement with Red Hat; cloudimg never ships or redistributes Red Hat software. Rocky Linux and OpenJDK 21 are open source software under their own licences.
Rocky Linux is compatible with Red Hat Enterprise Linux but is a separate distribution, and Red Hat's published configurations for JBoss EAP 8.1 list Red Hat Enterprise Linux, not Rocky Linux. Before you rely on Red Hat for JBoss EAP on this image, check Red Hat's JBoss EAP 8 Supported Configurations article and your subscription terms, or ask your Red Hat account team.
The listing charges $0.04 per vCPU per hour for the cloudimg image (an m5.large has 2 vCPUs, so $0.08 per hour), plus AWS infrastructure charges. The charge covers what cloudimg adds to Rocky Linux: the installer helper, the EAP configuration it applies, the per-instance first-boot keystore and passwords, the metadata block for the jboss user, SELinux enforcing, key-only SSH and the firewall rules. Your Red Hat subscription is separate, under your agreement with Red Hat.
Red Hat, JBoss and Red Hat JBoss Enterprise Application Platform are trademarks of Red Hat, Inc., used here only to describe compatibility. Rocky Linux is a trademark of the Rocky Enterprise Software Foundation. cloudimg is not affiliated with or endorsed by Red Hat, Inc. or the Rocky Enterprise Software Foundation.