Update BasicSwap
Update BasicSwap to the latest release with Docker, basicswap-bash or from source, then upgrade its coin cores with --upgradecores when a release needs it.
An update usually has two parts. The first updates BasicSwap itself, and the second, needed only when a release moves to newer versions, upgrades the coin daemons it runs, which BasicSwap calls coin cores. Each part takes a few minutes, and you need to stop BasicSwap for both.
Before you update
- Read the release notes for the version you're updating to, on the BasicSwap blog or in the repository. They say whether the release upgrades any coin cores, changes the database, or needs a manual step.
- Let swaps in progress finish, or at least don't update in the middle of one you're watching closely. BasicSwap picks up where it left off after a restart, but there's no reason to add risk.
- Stop BasicSwap cleanly. Press
Ctrl + Conce in its terminal and wait until it has shut down every coin daemon and returned to the prompt, or rundocker-compose stopin thebasicswap/dockerfolder. Closing the terminal or killing the process can leave a coin's database needing a reindex. - Back up the data folder,
~/coinswapsor/var/data/coinswapswith Docker, by copying it while BasicSwap is stopped. A new release may upgrade the database on its first start, and older versions aren't written for the upgraded database, so the copy is your way back to the version you had, as Back up and restore describes.
Update
basicswap-bash
With BasicSwap stopped, run the update command:
bsx-updateIt updates the basicswap-bash scripts, BasicSwap and its Python dependencies, then upgrades the coin cores, so all that's left is to start BasicSwap again with basicswap-bash.
Docker
-
In the
basicswap/dockerfolder, stop BasicSwap if it's still running, make sure the repository points at the official one, and download the update:docker-compose stop git remote set-url origin https://github.com/basicswap/basicswap git pull -
Rebuild the image, with
--no-cacheso that any changed dependencies are installed as well:docker-compose build --no-cache -
If the release notes mention new coin core versions, upgrade them, which updates every coin in your install at once:
docker-compose run --rm swapclient basicswap-prepare --datadir=/coindata --upgradecores -
Start BasicSwap again with the new image:
docker-compose up
From source
-
With BasicSwap stopped, set up the terminal and go to the source folder:
export SWAP_DATADIR=$HOME/coinswaps . $SWAP_DATADIR/venv/bin/activate cd $SWAP_DATADIR/basicswap -
Clear the old build, make sure the repository points at the official one, and download the update:
rm -rf build git remote set-url origin https://github.com/basicswap/basicswap git pull -
Install the new version into the virtual environment:
pip3 install --require-hashes -r requirements.txt pip3 install . -
If the release notes mention new coin core versions, upgrade them, which updates every coin in your install at once:
basicswap-prepare --datadir=$SWAP_DATADIR --upgradecores -
Start BasicSwap again on the new version:
basicswap-run --datadir=$SWAP_DATADIR
After updating
The first start after an update can take longer than usual while BasicSwap upgrades its database and the coin daemons start. Once it's up, the footer of the web UI shows the version now running, and if a coin daemon won't start, Troubleshooting covers the usual fixes.