This tutorial discusses how to set WildFly bind address using command line arguments and the configuration file. It applies to all WildFly versions and JBoss EAP as well.

Out of the box, WildFly binds at localhost and 127.0.0.1:

wildfly bind address jboss bind address

The simplest way to change the bind the address is passing the -b argument while starting the server like:

$ ./standalone.sh -c standalone-full.xml -b=192.168.10.1

Please note that "-b" is an alias for the property "jboss.bind.address":

$ ./standalone.sh -Djboss.bind.address=192.168.10.1

Also, you can configure it in your standalone XML file, setting it as follows:

<interface name="public">
    <inet-address value="${jboss.bind.address:192.168.10.1}"/>
</interface>

Much the same way, you can change WildFly's management IP Address as follows:

$ .standalone.sh -bmanagement=192.168.10.1

Please notice that, as you have a non-default bind address, you will need to configure the CLI appropriately when connecting:

$ ./jboss-cli.sh --connect controller=192.168.10.1

Binding WildFly to all available IP Addresses

If you want to bind WildFly to all available IP addresses, then execute:

$ ./standalone.sh -b=0.0.0.0

You can also bind the "management" interface to all available IP addresses as:

$ ./standalone.sh -bmanagement=0.0.0.0

And of course, you can bind both interfaces as:

$ ./standalone.sh -b=0.0.0.0 -bmanagement=0.0.0.0

Binding WildFly with Docker

If you are running WildFly with Docker, then you can choose the bind address by passing the above properties to the Docker process as follows:

docker run -p 8080:8080 -p 9990:9990 -it jboss/wildfly /opt/jboss/wildfly/bin/standalone.sh -bmanagement=0.0.0.0 -b 0.0.0.0

If you want to read how to configure the Port of WildFly, check this tutorial: Configuring port offset on JBoss AS / WildFly

0
0
0
s2sdefault

Related articles available on mastertheboss.com

JBoss MBeans POJO

JMX MBean services are the core building blocks of the JBoss Appl

How to a dump of JNDI tree with JMX console ?

#2 JBoss Howto. This is the recipe of the day

How to configure JBoss to bind to a different IP ?

If you want to change the jboss.bind.address property use the&nbs

How to shut down JBoss from remote ?

JBoss recipe of the day

How to create multiple instances of an Mbean?

  Supposing you need two instances of an MBean, let's say one fo

JBoss classloader issues

By default JBoss (prior to version 3.2) uses a flat class loading