UPDATED 17-5-2020
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:
“ws”: {
“port”: 5001,
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:
set PORT=6000
gunthy-gui.exe
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:
PORT=9000 ./gunthy-gui-linx64
PORT=9000 ./gunthy-gui-mac
PORT=9000 ./gunthy-gui-arm
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.
brandon 11 January, 2018
I have done this, but on my 2nd instance I don’t see any logs. Is there a way to activate logs on the instances other than the first?
Aitor 18 January, 2018
Try this:
1- Open your first instance and click RUN, so the config.js file is saved with the changes you did.
2- Now close the GUI and gunthy-gui.exe and execute the bot directly from gunthy.exe
3- Repeat this operation with second instance, so you will be able to run the instances directly from gunthy.exe
dio5757 31 January, 2018
Hi,
Can we run 4 instance in gunbot version 8.03?
Still same way?
How much pair ideal for 1 instance?
Should we change BOT Delay ?
Thx
Aitor 31 January, 2018
Hi, you can run any number of instances. Gunbot v8.0.3 is able to run multiple setups but it has a limitation: you have to use same BOT_DELAY for all the instances. If you want to set an especific BOT_DELAY for each instance, you can still follow these steps and run gunthy.exe manually for each directory.
Also note that there is a request / second limit for all exchanges. For example, for Poloniex you can run 1 instance setting BOT_DELAY to 20, two instances setting it to 40 etc… So the point of multiple instances is for running several exchanges at the same time, or Bittrex, which allows to run 2 instances with BOT_DELAY = 1
Kobkrit Viriyayudhakorn 12 January, 2018
Form my experience, only one guthy-gui-xxx can be run at a time. The logs on another will not display.
But we can run multiple guthy-xxx at the same time.
Edwin Oonk 14 January, 2018
Did you solve it Kobkrit
andyhwang 19 January, 2018
When I run multiple instances, those instance return “response error 418 I’m a teapot”.
where it came from?
I used 2 groups in binance, one “BTC-aaa”,”BTC-bbb” , two “BTC-ccc”, “BTC-ddd”
of course, each instance have differnet port already
Aitor 20 January, 2018
Take a look at this:
https://gunbot.shop/error-418-on-binance-what-does-it-mean/
If you run 2 instances, BOT_DELAY should be 2X
milupas 31 January, 2018
Does port in point 2- of your explanation have to match port in 3-?
Probably stupid question, but needed to be sure
Aitor 1 February, 2018
No, they don’t have to match, they are different things. One is the port used by Gunbot and the other is the port used for GUI.
joepiee 2 February, 2018
HI, i done all this, but when i go to localhost:6000 the page could not load. i have execute the .bat file with port on 6000 and the ws in the config to 5002.
Aitor 2 February, 2018
You need to create a bat file with this content:
set PORT=6000
gunthy-gui.exe
Doing that, the gui interface will open on localhost:6000
joepiee 3 February, 2018
yes i did that but still don’t work.
Aitor 3 February, 2018
If you bought your Gunbot license or bought Premium support pack from https://gunbot.shop you can contact us in order to get help. If not, you should be able to get help from the reseller you bought the bot from.
joepiee 3 February, 2018
I got it! i look likes chrome blockes it.. when i go in microsoft edge to localhost6000 it works
:)
Orca 10 February, 2018
set PORT=6000
gunthy-gui.exe this doesn’t change the port to Gunthy-gui it opens it but it still says port 5000 and I can only access if from 127.0.0.1:5000
Aitor 11 February, 2018
You need to create a .bat file with the content:
set PORT=6000
gunthy-gui.exe
Ten just place the .bat file in the bot directory and execute it. GUI will be accesible on port 6000
Genosophy 6 March, 2018
I’ve tried putting the windows batch file in the same directory as the gunthy-gui.exe file.
The batch file runs fine, but then if I try to start a gunthy-gui.exe when one is already running, the second one immediately crashes.
logging in to localhost:6000 on a web browser yields a ‘page not found’ error.
What step am i missing?
is there a special order this has to be done in?
Aitor 6 March, 2018
Hi, from v8.0.3 onwards, you can run multiple setups from one GUI. but it has a limitation: you have to use same BOT_DELAY for all the instances. If you want to set a specific BOT_DELAY for each instance, you can still follow these steps and run gunthy.exe manually for each directory. So:
– Option 1: Run several instances from GUI using the same BOT_DELAY for all the instances
– Option 2: Access to the GUI, change whatever you want for instance Nº1, click RUN in the dashboard, then click STOP. Now config.js file is saved. Ok, now copy the bot on a different directory and repeat the same process to save the config.js file that will be used for instance Nº2 and so on…
– Option 3: Run VmWare Workstation or other virtualization software and just run once instance for each guest OS. It needs a lot of computing resources but it’s the most easy way to handle several instances IMO.