Browse Source

Update Samourai Server app to v1.10.1 (#862)

Co-authored-by: Luke Childs <lukechilds123@gmail.com>
update-btcpay
Lounès Ksouri 3 years ago
committed by GitHub
parent
commit
77343e52fe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      apps/registry.json
  2. 13
      apps/samourai-server/docker-compose.yml
  3. 3
      apps/samourai-server/mysql/mysql-dojo.cnf
  4. 10
      apps/samourai-server/nginx/connect/index.html
  5. 1
      apps/samourai-server/nginx/connect/js/conf.template.js
  6. 1
      apps/samourai-server/nginx/connect/js/script.js
  7. 1
      scripts/app
  8. 8
      scripts/update/01-run.sh

6
apps/registry.json

@ -51,15 +51,15 @@
"id": "samourai-server",
"category": "Wallet Servers",
"name": "Samourai Server",
"version": "1.9.0",
"version": "1.10.1",
"tagline": "Your private backing server for Samourai Wallet",
"description": "Samourai Server is an exclusive Umbrel app that runs Samourai Dojo and Whirlpool backing servers, and provides you easy step-by-step instructions to connect your Samourai Wallet to them. Samourai Wallet is unrivaled in transaction privacy, but its default configuration is still subject to network level privacy loss.\n\nBy default, Samourai Wallet will connect to its centrally controlled Dojo hosted in Iceland. By hosting your own Samourai Server, you can bypass its servers completely when using Samourai Wallet or Sentinel, and gain total financial sovereignty without any complexity.",
"description": "Samourai Server is an exclusive Umbrel app that runs Samourai Dojo and Whirlpool backing servers, and provides you easy step-by-step instructions to connect your Samourai Wallet to them. Samourai Wallet is unrivaled in transaction privacy, but its default configuration is still subject to network level privacy loss.\n\nBy default, Samourai Wallet will connect to its centrally controlled Dojo hosted in Iceland. By hosting your own Samourai Server, you can bypass its servers completely when using Samourai Wallet or Sentinel, and gain total financial sovereignty without any complexity.\n\nBundles Whirlpool CLI v0.10.11.",
"developer": "Samourai",
"website": "https://samouraiwallet.com",
"dependencies": [
"bitcoind"
],
"repo": "https://github.com/louneskmt/umbrel-samourai-dojo/tree/v1.9.0-umbrel",
"repo": "https://github.com/louneskmt/umbrel-samourai-dojo/tree/v1.10.1-umbrel",
"support": "https://t.me/SamouraiWallet",
"port": 3005,
"gallery": [

13
apps/samourai-server/docker-compose.yml

@ -22,7 +22,7 @@ services:
ipv4_address: $APP_SAMOURAI_SERVER_DB_IP
node:
image: louneskmt/dojo-nodejs:1.9.0@sha256:fbef514d55dd848e038f9852e5b5146f18675c7c207e6370fb9f54d0fd6eb6ce
image: louneskmt/dojo-nodejs:1.10.1@sha256:d1460df18df091837718fcd0a6d3850e2f1a4a49da5914a697648c40d5477184
init: true
restart: on-failure
command: "/home/node/app/wait-for-it.sh db:3306 --timeout=720 --strict -- /home/node/app/restart.sh"
@ -30,9 +30,10 @@ services:
environment:
# GLOBAL
COMMON_BTC_NETWORK: $BITCOIN_NETWORK
DOJO_NODEJS_VERSION_TAG: 1.9.0
TOR_PROXY_IP: $TOR_PROXY_IP
TOR_PROXY_PORT: $TOR_PROXY_PORT
DOJO_NODEJS_VERSION_TAG: 1.10.1
NET_DOJO_TOR_IPV4: $TOR_PROXY_IP
NET_DOJO_TOR_PORT: $TOR_PROXY_PORT
NET_DOJO_MYSQL_IPV4: $APP_SAMOURAI_SERVER_DB_IP
# MYSQL
MYSQL_DATABASE: samourai-main
@ -85,12 +86,13 @@ services:
ipv4_address: $APP_SAMOURAI_SERVER_NODE_IP
whirlpool:
image: louneskmt/whirlpool:0.10.10@sha256:0914a0784a59819d55605e45b595b2715e5d1ed9b5aa5cd58db0fb068d8f6367
image: louneskmt/whirlpool:0.10.11@sha256:a7cfb9e287aa5f2e4137a5d2fdddbfd348624e24e7dd7bed7fa0f4e2e22734d5
init: true
restart: on-failure
user: "1000:1000"
command:
- "--listen"
- "--cli.apiKey=$SAMOURAI_SERVER_WHIRLPOOL_API_KEY"
- "--cli.api.http-enable=true"
- "--cli.api.http-port=$APP_SAMOURAI_SERVER_WHIRLPOOL_PORT"
- "--cli.tor=true"
@ -127,6 +129,7 @@ services:
WHIRLPOOL_HIDDEN_SERVICE: $SAMOURAI_SERVER_WHIRLPOOL_HIDDEN_SERVICE
NODE_PREFIX_SUPPORT: support
NODE_ADMIN_KEY: $SAMOURAI_SERVER_NODE_ADMIN_KEY
WHIRLPOOL_API_KEY: $SAMOURAI_SERVER_WHIRLPOOL_API_KEY
ports:
- "$APP_SAMOURAI_SERVER_PORT:80"
depends_on:

3
apps/samourai-server/mysql/mysql-dojo.cnf

@ -1,10 +1,11 @@
[mysqld]
sql_mode="NO_ENGINE_SUBSTITUTION"
transaction_isolation=READ-COMMITTED
performance_schema=off
innodb_buffer_pool_size=128M
innodb_buffer_pool_chunk_size=16M
key_buffer_size=8M
tmp_table_size=1M
max_connections=20
max_connections=80
sort_buffer_size=1M
query_cache_size=8M

10
apps/samourai-server/nginx/connect/index.html

@ -76,11 +76,13 @@
<li class="step">Install <a href="https://gist.github.com/lukechilds/0be1d56ecd28092822e4fa750b5945c0" target="_blank">Tor</a> on your computer.</li>
<li class="step">Download and install <a href="https://code.samourai.io/whirlpool/whirlpool-gui/-/releases"
target="_blank">Whirlpool GUI</a>.</li>
<li class="step">Select: Advanced: remote CLI.</li>
<li class="step">Select: Advanced: remote CLI.</li>
<li class="step">Enter "<b id="whirlpool-hidden-service"></b>" (without quotes) in “CLI
address”.</li>
<li class="step">Tor proxy should now auto enable and set itself to “socks5://127.0.0.1:9050”.</li>
<li class="step">Click connect.</li>
<li class="step">Click “Configure API key?”.</li>
<li class="step">Enter "<b id="whirlpool-api-key"></b>" (without quotes) in “API key”.</li>
<li class="step">Click “Connect”.</li>
<li class="step">Click QR code icon to scan a QR code from Samourai Wallet on your phone.</li>
<li class="step">Open Samourai Wallet on your phone.</li>
<li class="step">Go Settings > Transactions > Experimental > Pair to Whirlpool GUI. Show the QR code on your
@ -94,8 +96,8 @@
<p><strong>Note:</strong> You'll need to open Whirlpool GUI and re-enter your password to continue mixing after restarting or updating your Umbrel.</p>
</section>
<script src="js/qrcode.min.js"></script>
<script src="js/conf.js"></script>
<script src="js/script.js"></script>
<script src="js/conf.js?v1.10.1"></script>
<script src="js/script.js?v1.10.1"></script>
</body>
</html>

1
apps/samourai-server/nginx/connect/js/conf.template.js

@ -2,4 +2,5 @@ var dojoHiddenService = "$DOJO_HIDDEN_SERVICE";
var whirlpoolHiddenService = "http://$WHIRLPOOL_HIDDEN_SERVICE";
var bitcoinNetwork = "$COMMON_BTC_NETWORK";
var dojoAdminKey = "$NODE_ADMIN_KEY";
var whirlpoolApiKey = "$WHIRLPOOL_API_KEY";
var supportPrefix = "$NODE_PREFIX_SUPPORT";

1
apps/samourai-server/nginx/connect/js/script.js

@ -1,4 +1,5 @@
document.getElementById('dojo-admin-key').innerText = dojoAdminKey;
document.getElementById('whirlpool-api-key').innerText = whirlpoolApiKey;
var baseRoute = bitcoinNetwork == "testnet" ? "test/v2" : "v2";

1
scripts/app

@ -123,6 +123,7 @@ compose() {
export SAMOURAI_SERVER_NODE_API_KEY=$(derive_entropy "env-${app_entropy_identifier}-NODE_API_KEY")
export SAMOURAI_SERVER_NODE_ADMIN_KEY=$(derive_entropy "env-${app_entropy_identifier}-NODE_ADMIN_KEY")
export SAMOURAI_SERVER_NODE_JWT_SECRET=$(derive_entropy "env-${app_entropy_identifier}-NODE_JWT_SECRET")
export SAMOURAI_SERVER_WHIRLPOOL_API_KEY=$(derive_entropy "env-${app_entropy_identifier}-WHIRLPOOL_API_KEY")
docker-compose \
--env-file "${env_file}" \

8
scripts/update/01-run.sh

@ -177,6 +177,14 @@ rsync --archive \
"$UMBREL_ROOT"/.umbrel-"$RELEASE"/ \
"$UMBREL_ROOT"/
# Handle updating static assets for samourai-server app
samourai_app_dir="${UMBREL_ROOT}/apps/samourai-server/nginx/connect"
samourai_data_dir="${UMBREL_ROOT}/app-data/samourai-server/nginx/connect"
if [[ -d "${samourai_app_dir}" ]] && [[ -d "${samourai_data_dir}" ]]; then
echo "Found samourai-server install, attempting to update static assets..."
rsync --archive --verbose "${samourai_app_dir}/" "${samourai_data_dir}"
fi
# Fix permissions
echo "Fixing permissions"
find "$UMBREL_ROOT" -path "$UMBREL_ROOT/app-data" -prune -o -exec chown 1000:1000 {} +

Loading…
Cancel
Save