With latest Gunbot versions is no longer required to start separate instances in order to run multiple instances, as you can just add different instances from the GUI.
In the case you want to run multiple instances for some reason, you have to change ports on both “ws” and “GUI” sections of your config file (each instance would have different ports):
OLD METHOD (RUN MULTIPLE GUNBOT INSTANTES ON GUNBOT VERSIONS BELOW V11)
In some cases, we want to run multiple instances of Gunbot. In order to do this, we need to follow these easy steps:
1- Copy your Gunbot folder to a different folder, so you will have something like “Gunbot directory 1”, “Gunbot directory 2”, “Gunbot directory 3” etc…
2- Now edit config.js and change the port used by Gunbot:
Just change port 5001 for 5002 or any other port you want, so you won’t get “Bind EADDRINUSE null 5001” error.
Now you will be able to run multiple Gunbot instances just by executing gunthy.exe from different directories after editing config.js. Note that if you want to edit the config of every single instance from GUI instead of changing directly from config.js, you need to take a look to step 3.
3- Gunthy-gui.exe runs on port 5000 by default. We need to use a different port for each instance we want to run. How to change the port for each instance? Easy, just create a .bat file with the following content:
And then execute it. If you have 4 directories / instances, you need to put the bat file in each directory and use a different port for each one. For example, port 6000, 6001, 6002 and 6003. Now you can access to each config file from http://127.0.0.1:6000, http://127.0.0.1:6001 etc… Also remember to change ws port for each instance.
You can download a .bat file to set gunthy-gui port to 6000 here. Note that the file is called New port.bat.txt so you need to change it to New port.bat in order to be able to execute it.
If you want to set different port for Linux, Mac and ARM, you need to execute these commands:
Done, now you will be able to edit the config file for each instance directly or from GUI and execute several instances at the same time.