btcpayserver / btcpayserver-docker

Docker resources for hosting BTCPayServer easily
MIT License
578 stars 355 forks source link

Fix explicit wallet file paths #909

Closed napoly closed 2 months ago

napoly commented 3 months ago

follow up to https://github.com/btcpayserver/btcpayserver/pull/6066

napoly commented 3 months ago

@sethforprivacy

sethforprivacy commented 2 months ago

Discussing in Mattermost, but AFAICT this has broken Monero installs again. Please jump into Mattermost ASAP @napoly.

sethforprivacy commented 2 months ago

@NicolasDorier I've confirmed personally and with a merchant that this PR broke Monero support again. Please revert ASAP, as all Monero merchants that update will have their stores broken until this is done, unfortunately.

CC @Kukks

sethforprivacy commented 2 months ago

This is the fix for anyone else who has issues:

# Open the Monero fragment
vim docker-compose-generator/docker-fragments/monero.yml

# Edit line 17
# Replace "entrypoint: monero-wallet-rpc --rpc-bind-ip=0.0.0.0 --disable-rpc-login --confirm-external-bind --rpc-bind-port=18082 --non-interactive --trusted-daemon  --daemon-address=monerod:18081 --wallet-dir=/wallet --tx-notify="/bin/sh ./scripts/notifier.sh  -X GET http://btcpayserver:49392/monerolikedaemoncallback/tx?cryptoCode=xmr&hash=%s""
# With
    entrypoint: monero-wallet-rpc --rpc-bind-ip=0.0.0.0 --disable-rpc-login --confirm-external-bind --rpc-bind-port=18082 --non-interactive --trusted-daemon  --daemon-address=monerod:18081 --wallet-file=/wallet/wallet --password-file=/wallet/password --tx-notify="/bin/sh ./scripts/notifier.sh  -X GET http://btcpayserver:49392/monerolikedaemoncallback/tx?cryptoCode=xmr&hash=%s"

# Note the difference being changing from wallet-dir back to wallet-file/password-file
# --wallet-file=/wallet/wallet --password-file=/wallet/password

# Update the Monero container
./btcpay-update.sh

Essentially just replacing --wallet-dir=/wallet on line 17 with --wallet-file=/wallet/wallet --password-file=/wallet/password. Once the PR is reverted you'll need to run git restore docker-compose-generator/docker-fragments/monero.yml before you can update BTCPay again properly.

borisolah commented 2 months ago

There were some errors where the wallet was active but the invoice creation crashed if XMR was included (a duplicate error) this fixed that too if anyones wondering.

Severity: ERROR SqlState: 23505 MessageText: duplicate key value violates unique constraint "PK_AddressInvoices"

Kukks commented 2 months ago

This is the fix for anyone else who has issues:

# Open the Monero fragment
vim docker-compose-generator/docker-fragments/monero.yml

# Edit line 17
# Replace "entrypoint: monero-wallet-rpc --rpc-bind-ip=0.0.0.0 --disable-rpc-login --confirm-external-bind --rpc-bind-port=18082 --non-interactive --trusted-daemon  --daemon-address=monerod:18081 --wallet-dir=/wallet --tx-notify="/bin/sh ./scripts/notifier.sh  -X GET http://btcpayserver:49392/monerolikedaemoncallback/tx?cryptoCode=xmr&hash=%s""
# With
    entrypoint: monero-wallet-rpc --rpc-bind-ip=0.0.0.0 --disable-rpc-login --confirm-external-bind --rpc-bind-port=18082 --non-interactive --trusted-daemon  --daemon-address=monerod:18081 --wallet-file=/wallet/wallet --password-file=/wallet/password --tx-notify="/bin/sh ./scripts/notifier.sh  -X GET http://btcpayserver:49392/monerolikedaemoncallback/tx?cryptoCode=xmr&hash=%s"

# Note the difference being changing from wallet-dir back to wallet-file/password-file
# --wallet-file=/wallet/wallet --password-file=/wallet/password

# Update the Monero container
./btcpay-update.sh

Essentially just replacing --wallet-dir=/wallet on line 17 with --wallet-file=/wallet/wallet --password-file=/wallet/password. Once the PR is reverted you'll need to run git restore docker-compose-generator/docker-fragments/monero.yml before you can update BTCPay again properly.

Please open a PR with the fix.

sethforprivacy commented 2 months ago

@Kukks https://github.com/btcpayserver/btcpayserver-docker/pull/916