Hi,
Creating multiple instances on localhost is very easy.
It is enough to create multiple standalone instances. You can set all instances to refer the same configuration, while port numbers are externalized as system properties, each instance is automatically assigned a different port, without affecting the common configuration. You can redefine their ports by editing system properties for each instance separately, but if you don't care, you can just use the generated ports.
I recommend following this blog post
Creating a Simple Cluster with Payara Server, which describes how to create multiple instances based on the same configuration. The blog post further guides you to setting up Hazelcast and distributed memory among the instances, but this is not necessary. However, you may want to turn Hazelcast on later, so that you may share memory among your applications via JCache.
Alternatively, you may consider using
Payara Micro to run multiple applications on the same server. It is a server packaged as an executable JAR, so that you may easily run your applications just by something like:
java -jar payara-micro.jar --deploy application.war --port 8081
It provides Java EE Web Profile and some other API (JBatch, Concurrency, JCache, ...). All instances automatically cluster together - if you don't need it, just add argument option --noCluster to turn clustering off.
Ondrej