Upgrading Counterparty Core

Here are the commands I run on my cloud servers to upgrade them to the latest version.

These steps assume your node was setup this way: Manual Installation

Upgrade Procedure

sudo systemctl stop counterparty.service

cd counterparty-core

git fetch --tags
git checkout v10.4.1 # Edit This

pip uninstall counterparty-rs counterparty-core counterparty-wallet

cd counterparty-rs
pip3 install .
cd ..

cd counterparty-core
pip3 install .
cd ..

cd counterparty-wallet
pip3 install .
cd ..

sudo systemctl restart counterparty.service

journalctl -u counterparty -f

Systemd Unit Files

And my systemd service files looks like this:

Counterparty

[Unit]
Description=Counterparty Server
After=network.target

[Service]
ExecStart=/home/user/.local/bin/counterparty-server start
ExecStop=/bin/kill -s TERM $MAINPID
User=user
Group=user
WorkingDirectory=/home/user
Restart=always
RestartSec=10
KillMode=mixed
KillSignal=SIGTERM
TimeoutStopSec=20

[Install]
WantedBy=multi-user.target

Addrindexrs

[Unit]
Description=AddrIndexRS Service
After=bitcoind.service

[Service]
WorkingDirectory=/home/user/addrindexrs
ExecStart=/home/user/addrindexrs/target/release/addrindexrs -vvv --timestamp --indexer-rpc-host=0.0.0.0 --daemon-rpc-host=0.0.0.0 --daemon-dir=/home/user/snap/bitcoin-core/common/.bitcoin --db-dir=/home/user/addrindexrs/db --cookie=rpc:rpc
User=user
Group=user
Type=simple
KillMode=process
TimeoutSec=60
Restart=always
RestartSec=60
Environment="RUST_BACKTRACE=1"

[Install]
WantedBy=multi-user.target

Bitcoin

[Unit]
Description=Bitcoin Core Daemon
After=network.target

[Service]
ExecStart=/snap/bin/bitcoin-core.daemon -conf=/home/user/snap/bitcoin-core/common/.bitcoin/bitcoin.conf
User=user
Group=user
Type=simple
Restart=always
RestartSec=10
TimeoutSec=300

[Install]
WantedBy=multi-user.target

I used snap to install my bitcoin-core, your setup may be different. In terms of where addrindexrs db or your conf files are.