Dragonfly is already designed such that it is possible to start multiple instances on the same machine. Every instance acts as a web-server, so as long as the web-server port is different on each instance, you can run as many instances as required (and connect a physical or remote camera to each instance). Of course, the computing power available on the machine is the real limit.
It is possible to run multiple instances by duplicating the Dragonfly installation folder. If you’d like to run Dragonfly twice, just run the Dragonfly App from 2 different Dragonfly folders.
To do so it is required that the instances use different ports numbers. This can easily be changed from:
- the Dragonfly Application Configuration tab.
- or directly inside the
dragonfly2.properties
file.
Practically speaking these are the steps to create a replica:
- Terminate any running instance of the Dragonfly App (using the Terminate button under the Configuration tab).
- Access the folder
dragonfly/
- Make a copy of the
dragonfly/application/
directory and rename the copy into dragonfly/application_2/
- Access the folder
dragonfly/application_2/data/config
and open thedragonfly2.properties
file.- Set the
WEBSERVER_PORT
parameter to5002
- Save the file!
- Set the
- Open the start.sh file under
dragonfly/
:application_2 -
- Rename the directory string from
application
toapplication_2
- Rename the directory string from
- Change the port from
5000
to5002
- Save the file!
-
- Open the
start_headlesss.s
h file underdragonfly/application_2
:- rename the directory string from
application
toapplication_2
- Save the file!
- rename the directory string from
- Move into the
dragonfly/application_2
folder and launch the Dragonfly App using this string:java -jar dfja-2.4-dist.jar
- Proceed with the configuration of the new Dragonfly instance.
You can create other replicas by following the same steps.