π‘Common workflow
Upgrade to latest version
The latest versino of the bot usually contains bug fixes and new features. So it's important to keep your bot up to date.
First ssh into your Linux machine, cd into the folder of the bot, then download the zip file for the latest release.
The latest release can be found here: Releases
Cd into the bot folder
cd botGive permission to the upgrade script
chmod +x upgrade.shRun the upgrade script
./upgrade.shRestart your bot!
Downgrade to a certain version
This only works after version 0.3.7
Similiar to upgrade, you just call the script with the version you want to go to.
First ssh into your Linux machine, cd into the folder of the bot, then download the zip file for the latest release.
The latest release can be found here: Releases
Cd into the bot folder
cd botGive permission to the upgrade script
chmod +x upgrade.shRun the upgrade script with the version you want to download. for example 0.3.8
./upgrade.sh 0.3.8Restart your bot!
Run bot in background
When you ssh into a remote machine and run the bot, once you close the terminal, the bot will stop running. This section shows you how to run it even when your terminal is closed.
Create a screen session, called bot
screen -S botNow you are in a screen session. To verify, run
screen -lsYou should see something like the following:
There are screens on:
1059895.bot (05/23/24 03:11:34) (Attached)Attached means you are now in this screen session.
Now you can run the bot as shown above, which will run the bot inside the bot session, and it won't stop running even if you close the terminal!
./run.shOnce you close your terminal and reconnect, run the following to open the previous created session.
screen -r botTo fully close it, run
screen -X -S bot quitMake sure you don't have 2 sessions both running the bot together, or the bot will fail to run.
To exit a screen session while you are attached, press ctrl+a, then d
Run multiple bots with one Jupiter API
There are a few reasons that you may want to do this. As running Jupiter API is pretty expensive, you may want to only run one and connect multiple machines to the same Jupiter API.
Jupiter API runs on port 18080, you can connect to it from other machine by setting the JUPITER_URL=http://ip_of_your_machine:18080 on your machines that does not run Jupiter.
If you want to us a machine to just host the Jupiter API, and not run any bot on the machine, you can run ./run-jup.sh on the machine, which will just run Jupiter API for you. You can then use the Jupiter endpoint from other machines.
If you want to run multiple bots on the same machine with just one Jupiter API, you can run one bot as normal, and set DISABLE_LOCAL_JUPITER=true for all the other bots. This way only one Jupiter API will be run on your machine.
Migrate from 0.2.x to 0.3.x
Give permission to the upgrade script
Run the upgrade script
Give permission to everything
Run the migrate script
Then a config.yaml file should be automatically generated for you. Double check the config inside to make sure everything is good, then you have finished the migration!
You can optionally remove .env and base-mint.json file after fully migrated.
Upgrade/Downgrade Jupiter API version
You can run the upgrade-jup.sh script with a specific version you want to download and use
You can find all the Jupiter API versions here: https://github.com/jup-ag/jupiter-swap-api/releases
Example:
Use multiple IPs on your machine
This is just an example and there maybe better ways to do this.
First you should ask your server provider to give you additional ips to your server. Once you have that, you can do the following to utilize all of them when sending through jito.
Identify the Network Interface Name
The network interface name (eno1, eth0, etc.) can be identified using the following command:
This will list all network interfaces. Look for the active interface connected to your network (e.g., state UP). Example:
Add an Additional IP Address Temporarily
Replace eno1 with whatever your interface name is
Verify ip address is added correctly:
Install ipset
This will require you to re-run this on restart. Or you can search for how to add it permanently with Netplan.
Then set ipset for all jito regions
Finally set iptable rules to route through each ip one by one.
You should use your own ips here to replace ("1.1.1.1" "2.2.2.2" "3.3.3.3")
Then you are all set!
To verify, you can turn on jito log, and you should see much less jito rate limit response. Do note you need to also enable USE_SEPARATE_TIP_ACCOUNT for it to work properly.
Last updated