Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Empty file.
79 changes: 79 additions & 0 deletions litecoin-electrs/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
services:
app_proxy:
environment:
APP_HOST: litecoin-electrs_app_1
APP_PORT: 3006

app:
image: ghcr.io/ryleastark/umbrel-litecoin-electrs-gui:v1.0.12@sha256:f6ff41659e2cd0a3c9e7f7d2b5fe674ae83739bd110efb6456416514c2a07075
depends_on: [electrs]
restart: on-failure
environment:
ELECTRUM_HIDDEN_SERVICE: "${APP_LITECOIN_ELECTRS_RPC_HIDDEN_SERVICE}"
ELECTRUM_LOCAL_SERVICE: "${DEVICE_DOMAIN_NAME}"
ELECTRS_HOST: "${APP_LITECOIN_ELECTRS_NODE_IP}"
ELECTRS_PORT: "${APP_LITECOIN_ELECTRS_NODE_PORT}"
ELECTRS_MONITORING_HOST: "${APP_LITECOIN_ELECTRS_NODE_IP}"
ELECTRS_MONITORING_PORT: "4224"
ELECTRS_PROGRESS_PORT: "5514"
ELECTRUM_PORT: "${APP_LITECOIN_ELECTRS_NODE_PORT}"
LITECOIN_HOST: "${APP_LITECOIN_NODE_IP}"
RPC_USER: "${APP_LITECOIN_RPC_USER}"
RPC_PASSWORD: "${APP_LITECOIN_RPC_PASS}"
RPC_PORT: "${APP_LITECOIN_RPC_PORT}"
networks:
default:
ipv4_address: $APP_LITECOIN_ELECTRS_IP

electrs:
image: ghcr.io/ryleastark/umbrel-litecoin-electrs:v3.4.0-dev.3752866-umbrel.6@sha256:c0f06f7de5716f3ecd4b90432372411ba3ba4972f75b4da5011338355edff47b
init: true
stop_grace_period: 5m
restart: on-failure
command:
- -v
- --index-progress-stderr
- --monitoring-addr
- "0.0.0.0:4224"
- --network
- mainnet
- --daemon-rpc-addr
- "${APP_LITECOIN_NODE_IP}:${APP_LITECOIN_RPC_PORT}"
- --daemon-dir
- /data
- --electrum-rpc-addr
- "0.0.0.0:${APP_LITECOIN_ELECTRS_NODE_PORT}"
- --electrum-banner
- "Electrs (LTC) on Umbrel"
- --db-dir
- /data/db
- --jsonrpc-import
- --lightmode
volumes:
- "${APP_DATA_DIR}/data/electrs-v3:/data"
ports:
- "${APP_LITECOIN_ELECTRS_NODE_PORT}:${APP_LITECOIN_ELECTRS_NODE_PORT}"
logging:
driver: syslog
options:
syslog-address: "udp://${APP_LITECOIN_ELECTRS_IP}:5514"
syslog-format: rfc3164
tag: electrs-progress
mode: non-blocking
max-buffer-size: 1m
networks:
default:
ipv4_address: $APP_LITECOIN_ELECTRS_NODE_IP

tor:
image: ghcr.io/getumbrel/tor:0.4.9.11@sha256:e382b8629c0dfef6ceb396b062622d4e4e955b19d6f16b883fd2c0723ad5671a
user: "1000:1000"
restart: on-failure
volumes:
- ${APP_DATA_DIR}/torrc:/etc/tor/torrc:ro
- ${TOR_DATA_DIR}:/data
environment:
HOME: "/tmp"
networks:
default:
ipv4_address: "${APP_LITECOIN_ELECTRS_TOR_IP}"
7 changes: 7 additions & 0 deletions litecoin-electrs/exports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export APP_LITECOIN_ELECTRS_IP="10.21.24.210"
export APP_LITECOIN_ELECTRS_NODE_IP="10.21.25.210"
export APP_LITECOIN_ELECTRS_TOR_IP="10.21.24.211"
export APP_LITECOIN_ELECTRS_NODE_PORT="51001"

rpc_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-rpc/hostname"
export APP_LITECOIN_ELECTRS_RPC_HIDDEN_SERVICE="$(cat "${rpc_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")"
26 changes: 26 additions & 0 deletions litecoin-electrs/hooks/pre-start
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail

ELECTRS_DATA_DIR="${APP_DATA_DIR}/data/electrs-v3"
COOKIE_FILE="${ELECTRS_DATA_DIR}/.cookie"
COOKIE_TMP="${COOKIE_FILE}.tmp.$$"

install -d -m 0700 -o 1000 -g 1000 "${ELECTRS_DATA_DIR}"
trap 'rm -f "${COOKIE_TMP}"' EXIT
install -m 0600 -o 1000 -g 1000 /dev/null "${COOKIE_TMP}"
printf '%s:%s' "${APP_LITECOIN_RPC_USER}" "${APP_LITECOIN_RPC_PASS}" >"${COOKIE_TMP}"
mv -f "${COOKIE_TMP}" "${COOKIE_FILE}"
chown 1000:1000 "${COOKIE_FILE}"
chmod 0600 "${COOKIE_FILE}"
trap - EXIT

HIDDEN_SERVICE_FILE="${TOR_DATA_DIR}/app-${APP_ID}-rpc/hostname"
if [[ ! -f "${HIDDEN_SERVICE_FILE}" ]]; then
"${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" up --detach electrs
"${UMBREL_ROOT}/scripts/app" compose "${APP_ID}" up --detach tor
echo "App: ${APP_ID} - Generating Tor hidden service..."
for _ in $(seq 1 100); do
[[ -f "${HIDDEN_SERVICE_FILE}" ]] && break
sleep 0.1
done
fi
3 changes: 3 additions & 0 deletions litecoin-electrs/torrc.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Electrs (LTC) RPC hidden service
HiddenServiceDir /data/app-$APP_ID-rpc
HiddenServicePort $APP_LITECOIN_ELECTRS_NODE_PORT $APP_LITECOIN_ELECTRS_NODE_IP:$APP_LITECOIN_ELECTRS_NODE_PORT
26 changes: 26 additions & 0 deletions litecoin-electrs/umbrel-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
manifestVersion: 1
id: litecoin-electrs
category: bitcoin
name: "Electrs (LTC)"
version: "3.4.0-dev.3752866-umbrel.12"
tagline: "A private Litecoin Electrum server powered by Electrs"
description: >-
Run a personal Electrum server for Litecoin using the maintained rust-litecoin fork of
mempool-electrs. Electrs (LTC) builds a private light-mode index from your Litecoin Core node
over JSON-RPC and serves wallet history over your local network or Tor on port 51001.
releaseNotes: ""
developer: rust-litecoin, mempool, and RyleaStark
website: https://github.com/RyleaStark/umbrel-litecoin-electrs
dependencies:

Check failure on line 14 in litecoin-electrs/umbrel-app.yml

View workflow job for this annotation

GitHub Actions / Lint apps

manifest.dependencies

Unknown dependency app `litecoin-core`.

Check failure on line 14 in litecoin-electrs/umbrel-app.yml

View workflow job for this annotation

GitHub Actions / Lint apps

manifest.dependencies

Unknown dependency app `litecoin-core`.
- litecoin-core
repo: https://github.com/RyleaStark/umbrel-litecoin-electrs
support: https://github.com/RyleaStark/umbrel-litecoin-electrs/issues
port: 12111
gallery: []
path: ""
defaultPassword: ""
submitter: Rylea Stark
submission: https://github.com/getumbrel/umbrel-apps/pull/5977
backupIgnore:
- data/electrs
- data/electrs-v3
Loading