🔡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 bot
Give permission to the upgrade script
chmod +x upgrade.sh
Run the upgrade script
./upgrade.sh
Restart 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 bot
Give permission to the upgrade script
chmod +x upgrade.sh
Run the upgrade script with the version you want to download. for example 0.3.8
./upgrade.sh 0.3.8
Restart 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 bot
Now you are in a screen session. To verify, run
screen -ls
You 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.sh
Once you close your terminal and reconnect, run the following to open the previous created session.
screen -r bot
To fully close it, run
screen -X -S bot quit
Make 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
chmod +x upgrade.sh
Run the upgrade script
./upgrade.sh
Give permission to everything
chmod +x *
Run the migrate script
./migrate
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.
Last updated