Luke Childs
3 years ago
56 changed files with 725 additions and 196 deletions
@ -0,0 +1,36 @@ |
|||
version: "3.7" |
|||
|
|||
services: |
|||
app_proxy: |
|||
environment: |
|||
APP_HOST: $APP_BITCOIN_IP |
|||
APP_PORT: 3005 |
|||
|
|||
server: |
|||
image: cookiemonster123/umbrel-bitcoin:v0.2.0@sha256:74fcac4f811ca0451a6ff108087298f752759b0be9d6c7b116642497dd702a27 |
|||
depends_on: [bitcoind] |
|||
restart: on-failure |
|||
environment: |
|||
PORT: "3005" |
|||
BITCOIN_HOST: "${APP_BITCOIN_NODE_IP}" |
|||
RPC_PORT: "${APP_BITCOIN_RPC_PORT}" |
|||
RPC_USER: "${APP_BITCOIN_RPC_USER}" |
|||
RPC_PASSWORD: "${APP_BITCOIN_RPC_PASS}" |
|||
BITCOIN_RPC_HIDDEN_SERVICE: "${APP_BITCOIN_RPC_HIDDEN_SERVICE}" |
|||
BITCOIN_P2P_HIDDEN_SERVICE: "${APP_BITCOIN_P2P_HIDDEN_SERVICE}" |
|||
networks: |
|||
default: |
|||
ipv4_address: $APP_BITCOIN_IP |
|||
|
|||
bitcoind: |
|||
image: lncm/bitcoind:v22.0@sha256:37a1adb29b3abc9f972f0d981f45e41e5fca2e22816a023faa9fdc0084aa4507 |
|||
command: "${APP_BITCOIN_COMMAND}" |
|||
restart: on-failure |
|||
stop_grace_period: 15m30s |
|||
volumes: |
|||
- "${APP_BITCOIN_DATA_DIR}:/data/.bitcoin" |
|||
ports: |
|||
- "${APP_BITCOIN_P2P_PORT}:${APP_BITCOIN_P2P_PORT}" |
|||
networks: |
|||
default: |
|||
ipv4_address: $APP_BITCOIN_NODE_IP |
@ -0,0 +1,85 @@ |
|||
export APP_BITCOIN_IP="10.21.22.2" |
|||
export APP_BITCOIN_NODE_IP="10.21.21.8" |
|||
|
|||
export APP_BITCOIN_DATA_DIR="${EXPORTS_APP_DIR}/data/bitcoin" |
|||
export APP_BITCOIN_RPC_PORT="8332" |
|||
export APP_BITCOIN_P2P_PORT="8333" |
|||
export APP_BITCOIN_ZMQ_RAWBLOCK_PORT="28332" |
|||
export APP_BITCOIN_ZMQ_RAWTX_PORT="28333" |
|||
export APP_BITCOIN_ZMQ_HASHBLOCK_PORT="28334" |
|||
export APP_BITCOIN_ZMQ_SEQUENCE_PORT="28335" |
|||
|
|||
BITCOIN_CHAIN="main" |
|||
BITCOIN_ENV_FILE="${EXPORTS_APP_DIR}/.env" |
|||
|
|||
if [[ ! -f "${BITCOIN_ENV_FILE}" ]]; then |
|||
if [[ -z "${BITCOIN_NETWORK}" ]]; then |
|||
BITCOIN_NETWORK="mainnet" |
|||
fi |
|||
|
|||
if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then |
|||
BITCOIN_RPC_USER="umbrel" |
|||
BITCOIN_RPC_DETAILS=$("${EXPORTS_APP_DIR}/scripts/rpcauth.py" "${BITCOIN_RPC_USER}") |
|||
BITCOIN_RPC_PASS=$(echo "$BITCOIN_RPC_DETAILS" | tail -1) |
|||
BITCOIN_RPC_AUTH=$(echo "$BITCOIN_RPC_DETAILS" | head -2 | tail -1 | sed -e "s/^rpcauth=//") |
|||
fi |
|||
|
|||
echo "export APP_BITCOIN_NETWORK='${BITCOIN_NETWORK}'" > "${BITCOIN_ENV_FILE}" |
|||
echo "export APP_BITCOIN_RPC_USER='${BITCOIN_RPC_USER}'" >> "${BITCOIN_ENV_FILE}" |
|||
echo "export APP_BITCOIN_RPC_PASS='${BITCOIN_RPC_PASS}'" >> "${BITCOIN_ENV_FILE}" |
|||
echo "export APP_BITCOIN_RPC_AUTH='${BITCOIN_RPC_AUTH}'" >> "${BITCOIN_ENV_FILE}" |
|||
fi |
|||
|
|||
. "${BITCOIN_ENV_FILE}" |
|||
|
|||
if [[ "${APP_BITCOIN_NETWORK}" == "mainnet" ]]; then |
|||
BITCOIN_CHAIN="main" |
|||
elif [[ "${APP_BITCOIN_NETWORK}" == "testnet" ]]; then |
|||
BITCOIN_CHAIN="test" |
|||
export APP_BITCOIN_RPC_PORT="18332" |
|||
export APP_BITCOIN_P2P_PORT="18333" |
|||
elif [[ "${APP_BITCOIN_NETWORK}" == "signet" ]]; then |
|||
BITCOIN_CHAIN="signet" |
|||
export APP_BITCOIN_RPC_PORT="38332" |
|||
export APP_BITCOIN_P2P_PORT="38333" |
|||
elif [[ "${APP_BITCOIN_NETWORK}" == "regtest" ]]; then |
|||
BITCOIN_CHAIN="regtest" |
|||
export APP_BITCOIN_RPC_PORT="18443" |
|||
export APP_BITCOIN_P2P_PORT="18444" |
|||
else |
|||
echo "Warning (${EXPORTS_APP_ID}): Bitcoin Network '${APP_BITCOIN_NETWORK}' is not supported" |
|||
fi |
|||
|
|||
BIN_ARGS=() |
|||
BIN_ARGS+=( "-chain=${BITCOIN_CHAIN}" ) |
|||
BIN_ARGS+=( "-proxy=${TOR_PROXY_IP}:${TOR_PROXY_PORT}" ) |
|||
BIN_ARGS+=( "-listen" ) |
|||
BIN_ARGS+=( "-bind=${APP_BITCOIN_NODE_IP}" ) |
|||
BIN_ARGS+=( "-port=${APP_BITCOIN_P2P_PORT}" ) |
|||
BIN_ARGS+=( "-rpcport=${APP_BITCOIN_RPC_PORT}" ) |
|||
BIN_ARGS+=( "-rpcbind=${APP_BITCOIN_NODE_IP}" ) |
|||
BIN_ARGS+=( "-rpcbind=127.0.0.1" ) |
|||
BIN_ARGS+=( "-rpcallowip=${NETWORK_IP}/16" ) |
|||
BIN_ARGS+=( "-rpcallowip=127.0.0.1" ) |
|||
BIN_ARGS+=( "-rpcauth=\"${APP_BITCOIN_RPC_AUTH}\"" ) |
|||
BIN_ARGS+=( "-dbcache=200" ) |
|||
BIN_ARGS+=( "-maxmempool=300" ) |
|||
BIN_ARGS+=( "-zmqpubrawblock=tcp://0.0.0.0:${APP_BITCOIN_ZMQ_RAWBLOCK_PORT}" ) |
|||
BIN_ARGS+=( "-zmqpubrawtx=tcp://0.0.0.0:${APP_BITCOIN_ZMQ_RAWTX_PORT}" ) |
|||
BIN_ARGS+=( "-zmqpubhashblock=tcp://0.0.0.0:${APP_BITCOIN_ZMQ_HASHBLOCK_PORT}" ) |
|||
BIN_ARGS+=( "-zmqpubsequence=tcp://0.0.0.0:${APP_BITCOIN_ZMQ_SEQUENCE_PORT}" ) |
|||
BIN_ARGS+=( "-txindex=1" ) |
|||
BIN_ARGS+=( "-blockfilterindex=1" ) |
|||
BIN_ARGS+=( "-peerbloomfilters=1" ) |
|||
BIN_ARGS+=( "-peerblockfilters=1" ) |
|||
BIN_ARGS+=( "-deprecatedrpc=addresses" ) |
|||
BIN_ARGS+=( "-rpcworkqueue=128" ) |
|||
|
|||
export APP_BITCOIN_COMMAND=$(IFS=" "; echo "${BIN_ARGS[@]}") |
|||
|
|||
# echo "${APP_BITCOIN_COMMAND}" |
|||
|
|||
rpc_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-rpc/hostname" |
|||
p2p_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-p2p/hostname" |
|||
export APP_BITCOIN_RPC_HIDDEN_SERVICE="$(cat "${rpc_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" |
|||
export APP_BITCOIN_P2P_HIDDEN_SERVICE="$(cat "${p2p_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" |
@ -0,0 +1,46 @@ |
|||
#!/usr/bin/env python3 |
|||
# Copyright (c) 2015-2018 The Bitcoin Core developers |
|||
# Distributed under the MIT software license, see the accompanying |
|||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. |
|||
|
|||
from argparse import ArgumentParser |
|||
from base64 import urlsafe_b64encode |
|||
from binascii import hexlify |
|||
from getpass import getpass |
|||
from os import urandom |
|||
|
|||
import hmac |
|||
|
|||
def generate_salt(size): |
|||
"""Create size byte hex salt""" |
|||
return hexlify(urandom(size)).decode() |
|||
|
|||
def generate_password(): |
|||
"""Create 32 byte b64 password""" |
|||
return urlsafe_b64encode(urandom(32)).decode('utf-8') |
|||
|
|||
def password_to_hmac(salt, password): |
|||
m = hmac.new(bytearray(salt, 'utf-8'), bytearray(password, 'utf-8'), 'SHA256') |
|||
return m.hexdigest() |
|||
|
|||
def main(): |
|||
parser = ArgumentParser(description='Create login credentials for a JSON-RPC user') |
|||
parser.add_argument('username', help='the username for authentication') |
|||
parser.add_argument('password', help='leave empty to generate a random password or specify "-" to prompt for password', nargs='?') |
|||
args = parser.parse_args() |
|||
|
|||
if not args.password: |
|||
args.password = generate_password() |
|||
elif args.password == '-': |
|||
args.password = getpass() |
|||
|
|||
# Create 16 byte hex salt |
|||
salt = generate_salt(16) |
|||
password_hmac = password_to_hmac(salt, args.password) |
|||
|
|||
print('String to be appended to bitcoin.conf:') |
|||
print('rpcauth={0}:{1}${2}'.format(args.username, salt, password_hmac)) |
|||
print('Your password:\n{0}'.format(args.password)) |
|||
|
|||
if __name__ == '__main__': |
|||
main() |
@ -0,0 +1,11 @@ |
|||
# Bitcoin Core P2P Hidden Service |
|||
HiddenServiceDir /data/app-$APP_ID-p2p |
|||
HiddenServicePort $APP_BITCOIN_P2P_PORT $APP_BITCOIN_NODE_IP:$APP_BITCOIN_P2P_PORT |
|||
|
|||
# Bitcoin Core RPC Hidden Service |
|||
HiddenServiceDir /data/app-$APP_ID-rpc |
|||
HiddenServicePort $APP_BITCOIN_RPC_PORT $APP_BITCOIN_NODE_IP:$APP_BITCOIN_RPC_PORT |
|||
|
|||
# Bitcoin Core Frontend Hidden Service |
|||
HiddenServiceDir /data/app-$APP_ID |
|||
HiddenServicePort 80 $APP_PROXY_HOSTNAME:$APP_PROXY_PORT |
@ -0,0 +1,20 @@ |
|||
manifestVersion: 1 |
|||
id: bitcoin |
|||
category: Finance |
|||
name: Bitcoin |
|||
version: v22.0 |
|||
tagline: Bitcoins are amazing |
|||
description: > |
|||
Bitcoin is the knees of the bee |
|||
developer: Umbrel |
|||
website: https://bitcoin.org |
|||
dependencies: [] |
|||
repo: https://github.com/getumbrel/bitcoin |
|||
support: https://github.com/getumbrel/bitcoin/issues |
|||
port: 10000 |
|||
gallery: |
|||
- 1.jpg |
|||
- 2.jpg |
|||
- 3.jpg |
|||
path: "" |
|||
defaultPassword: "" |
@ -0,0 +1,44 @@ |
|||
version: "3.7" |
|||
|
|||
services: |
|||
app_proxy: |
|||
environment: |
|||
APP_HOST: $APP_ELECTRS_IP |
|||
APP_PORT: 3006 |
|||
|
|||
app: |
|||
image: cookiemonster123/umbrel-electrs:v1.0.1@sha256:0a447406c64523b30429d8d70751e6bc19b3fdb830b778555d3904a6cce2f5b5 |
|||
depends_on: |
|||
- electrs |
|||
restart: on-failure |
|||
environment: |
|||
ELECTRUM_HIDDEN_SERVICE: "${APP_HIDDEN_SERVICE}" |
|||
ELECTRUM_LOCAL_SERVICE: "${DEVICE_DOMAIN_NAME}" |
|||
ELECTRS_HOST: "${APP_ELECTRS_NODE_IP}" |
|||
BITCOIN_HOST: "${APP_BITCOIN_NODE_IP}" |
|||
RPC_USER: "${APP_BITCOIN_RPC_USER}" |
|||
RPC_PASSWORD: "${APP_BITCOIN_RPC_PASS}" |
|||
networks: |
|||
default: |
|||
ipv4_address: $APP_ELECTRS_IP |
|||
|
|||
electrs: |
|||
image: getumbrel/electrs:v0.9.4@sha256:b1590ac6cfb0e5b481c6a7af7f0626d76cbb91c63702b0f5c47e2829e9c37997 |
|||
restart: always |
|||
environment: |
|||
ELECTRS_LOG_FILTERS: "INFO" |
|||
ELECTRS_NETWORK: "${APP_BITCOIN_NETWORK}" |
|||
ELECTRS_DAEMON_RPC_ADDR: "${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_RPC_PORT}" |
|||
ELECTRS_DAEMON_P2P_ADDR: "${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_P2P_PORT}" |
|||
ELECTRS_ELECTRUM_RPC_ADDR: "0.0.0.0:${APP_ELECTRS_NODE_PORT}" |
|||
ELECTRS_SERVER_BANNER: "Umbrel Electrs (${APP_VERSION})" |
|||
ELECTRS_DB_DIR: "/data/db" |
|||
ELECTRS_COOKIE_FILE: "/data/.bitcoin/${APP_BITCOIN_NETWORK}/.cookie" |
|||
volumes: |
|||
- "${APP_BITCOIN_DATA_DIR}:/data/.bitcoin:ro" |
|||
- "${APP_DATA_DIR}/data/electrs:/data" |
|||
ports: |
|||
- "${APP_ELECTRS_NODE_PORT}:${APP_ELECTRS_NODE_PORT}" |
|||
networks: |
|||
default: |
|||
ipv4_address: $APP_ELECTRS_NODE_IP |
@ -0,0 +1,4 @@ |
|||
export APP_ELECTRS_IP="10.21.22.4" |
|||
export APP_ELECTRS_NODE_IP="10.21.21.10" |
|||
|
|||
export APP_ELECTRS_NODE_PORT="50001" |
@ -0,0 +1,7 @@ |
|||
# Electrs RPC Hidden Service |
|||
HiddenServiceDir /data/app-$APP_ID-rpc |
|||
HiddenServicePort $APP_ELECTRS_NODE_PORT $APP_ELECTRS_NODE_IP:$APP_ELECTRS_NODE_PORT |
|||
|
|||
# Electrs Frontend Hidden Service |
|||
HiddenServiceDir /data/app-$APP_ID |
|||
HiddenServicePort 80 $APP_PROXY_HOSTNAME:$APP_PROXY_PORT |
@ -0,0 +1,20 @@ |
|||
manifestVersion: 1 |
|||
id: electrs |
|||
category: Finance |
|||
name: Electrs |
|||
version: v0.14.1-beta |
|||
tagline: Electrs needs a tagline |
|||
description: > |
|||
Description goes here |
|||
developer: Umbrel |
|||
website: https://getumbrel.com/ |
|||
dependencies: [] |
|||
repo: https://github.com/getumbrel/electrs |
|||
support: https://github.com/getumbrel/electrs/issues |
|||
port: 10002 |
|||
gallery: |
|||
- 1.jpg |
|||
- 2.jpg |
|||
- 3.jpg |
|||
path: "" |
|||
defaultPassword: "" |
@ -0,0 +1,2 @@ |
|||
export APP_ELECTRUMX_IP="10.21.22.5" |
|||
export APP_ELECTRUMX_NODE_IP="10.21.21.59" |
@ -0,0 +1,20 @@ |
|||
manifestVersion: 1 |
|||
id: electrumx |
|||
category: Finance |
|||
name: Electrumx |
|||
version: v1.16.0 |
|||
tagline: Electrumx needs a tagline |
|||
description: > |
|||
Description goes here |
|||
developer: Umbrel |
|||
website: https://getumbrel.com/ |
|||
dependencies: [] |
|||
repo: https://github.com/getumbrel/electrumx |
|||
support: https://github.com/getumbrel/electrumx/issues |
|||
port: 10004 |
|||
gallery: |
|||
- 1.jpg |
|||
- 2.jpg |
|||
- 3.jpg |
|||
path: "" |
|||
defaultPassword: "" |
@ -0,0 +1,37 @@ |
|||
version: "3.7" |
|||
|
|||
services: |
|||
app_proxy: |
|||
environment: |
|||
APP_HOST: $APP_FULCRUM_IP |
|||
APP_PORT: 3006 |
|||
|
|||
app: |
|||
image: getumbrel/umbrel-fulcrum |
|||
depends_on: |
|||
- fulcrum |
|||
restart: on-failure |
|||
environment: |
|||
FULCRUM_HIDDEN_SERVICE: "${APP_HIDDEN_SERVICE}" |
|||
FULCRUM_LOCAL_SERVICE: "${DEVICE_DOMAIN_NAME}" |
|||
FULCRUM_HOST: "${APP_FULCRUM_NODE_IP}" |
|||
FULCRUM_STATS_PORT: 8080 |
|||
BITCOIN_HOST: "${APP_BITCOIN_NODE_IP}" |
|||
RPC_USER: "${APP_BITCOIN_RPC_USER}" |
|||
RPC_PASSWORD: "${APP_BITCOIN_RPC_PASS}" |
|||
RPC_PORT: "${APP_BITCOIN_RPC_PORT}" |
|||
networks: |
|||
default: |
|||
ipv4_address: $APP_FULCRUM_IP |
|||
|
|||
fulcrum: |
|||
image: cculianu/fulcrum |
|||
init: true |
|||
command: "${APP_FULCRUM_COMMAND}" |
|||
volumes: |
|||
- "${APP_BITCOIN_DATA_DIR}:/data/.bitcoin:ro" |
|||
- "${APP_DATA_DIR}/data:/data" |
|||
restart: always |
|||
networks: |
|||
default: |
|||
ipv4_address: $APP_FULCRUM_NODE_IP |
@ -0,0 +1,14 @@ |
|||
export APP_FULCRUM_IP="10.21.22.6" |
|||
export APP_FULCRUM_NODE_IP="10.21.22.7" |
|||
|
|||
BIN_NAME="Fulcrum" |
|||
BIN_ARGS=() |
|||
BIN_ARGS+=( "--datadir /data/${APP_BITCOIN_NETWORK}" ) |
|||
BIN_ARGS+=( "--bitcoind ${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_RPC_PORT}" ) |
|||
BIN_ARGS+=( "--rpcuser ${APP_BITCOIN_RPC_USER}" ) |
|||
BIN_ARGS+=( "--rpcpassword ${APP_BITCOIN_RPC_PASS}" ) |
|||
BIN_ARGS+=( "--tcp 0.0.0.0:50001" ) |
|||
|
|||
export APP_FULCRUM_COMMAND="${BIN_NAME} $(IFS=" "; echo "${BIN_ARGS[@]}")" |
|||
|
|||
# echo "${APP_FULCRUM_COMMAND}" |
@ -0,0 +1,20 @@ |
|||
manifestVersion: 1 |
|||
id: fulcrum |
|||
category: Finance |
|||
name: Fulcrum |
|||
version: 1.6.0 |
|||
tagline: Fulcrum is great, init |
|||
description: > |
|||
Hello World |
|||
developer: Umbrel |
|||
website: https://getumbrel.com/ |
|||
dependencies: [] |
|||
repo: https://github.com/getumbrel/fulcrum |
|||
support: https://github.com/getumbrel/fulcrum/issues |
|||
port: 10003 |
|||
gallery: |
|||
- 1.jpg |
|||
- 2.jpg |
|||
- 3.jpg |
|||
path: "" |
|||
defaultPassword: "" |
@ -0,0 +1,7 @@ |
|||
[Application Options] |
|||
maxpendingchannels=3 |
|||
minchansize=10000 |
|||
accept-keysend=true |
|||
|
|||
[Bitcoin] |
|||
bitcoin.defaultchanconfs=2 |
@ -0,0 +1,52 @@ |
|||
version: "3.7" |
|||
|
|||
services: |
|||
app_proxy: |
|||
environment: |
|||
APP_HOST: $APP_LIGHTNING_IP |
|||
APP_PORT: 3006 |
|||
|
|||
app: |
|||
image: cookiemonster123/umbrel-lightning:v1.0.2@sha256:41d651ec0ba1fba9173bd06cbf2a1093dd2ba0485432aea177a9255ae3211934 |
|||
restart: on-failure |
|||
volumes: |
|||
- "${APP_LIGHTNING_NODE_DATA_DIR}:/data/.lnd" |
|||
- "${APP_DATA_DIR}/data/lightning:/data" |
|||
- "${UMBREL_ROOT}/statuses:/statuses" |
|||
environment: |
|||
PORT: "3006" |
|||
TOR_PROXY_IP: "${TOR_PROXY_IP}" |
|||
TOR_PROXY_PORT: "${TOR_PROXY_PORT}" |
|||
BITCOIN_HOST: "${APP_BITCOIN_NODE_IP}" |
|||
RPC_PORT: "${APP_BITCOIN_RPC_PORT}" |
|||
RPC_USER: "${APP_BITCOIN_RPC_USER}" |
|||
RPC_PASSWORD: "${APP_BITCOIN_RPC_PASS}" |
|||
LND_NETWORK: "${APP_BITCOIN_NETWORK}" |
|||
LND_HOST: "${APP_LIGHTNING_NODE_IP}" |
|||
LND_REST_HIDDEN_SERVICE_FILE: "${APP_LIGHTNING_REST_HIDDEN_SERVICE}" |
|||
LND_GRPC_HIDDEN_SERVICE_FILE: "${APP_LIGHTNING_GRPC_HIDDEN_SERVICE}" |
|||
TLS_FILE: "/data/.lnd/tls.cert" |
|||
MACAROON_DIR: "/data/.lnd/data/chain/bitcoin/${APP_BITCOIN_NETWORK}/" |
|||
CHANNEL_BACKUP_FILE: "/data/.lnd/data/chain/bitcoin/${APP_BITCOIN_NETWORK}/channel.backup" |
|||
BACKUP_STATUS_FILE: "/statuses/backup-status.json" |
|||
JSON_STORE_FILE: "/data/state.json" |
|||
ports: |
|||
- "$APP_LIGHTNING_NODE_PORT:$APP_LIGHTNING_NODE_PORT" |
|||
- "$APP_LIGHTNING_NODE_REST_PORT:$APP_LIGHTNING_NODE_REST_PORT" |
|||
- "$APP_LIGHTNING_NODE_GRPC_PORT:$APP_LIGHTNING_NODE_GRPC_PORT" |
|||
networks: |
|||
default: |
|||
ipv4_address: $APP_LIGHTNING_IP |
|||
|
|||
lnd: |
|||
image: lightninglabs/lnd:v0.14.1-beta@sha256:810f290f4da51adaf57d53bc1f1e65b52b03c543f322da0b98fb8c47be94a27a |
|||
command: "${APP_LIGHTNING_COMMAND}" |
|||
user: 1000:1000 |
|||
restart: on-failure |
|||
volumes: |
|||
- "${APP_LIGHTNING_NODE_DATA_DIR}:/data/.lnd" |
|||
environment: |
|||
HOME: /data |
|||
networks: |
|||
default: |
|||
ipv4_address: $APP_LIGHTNING_NODE_IP |
@ -0,0 +1,58 @@ |
|||
export APP_LIGHTNING_IP="10.21.22.3" |
|||
export APP_LIGHTNING_NODE_IP="10.21.21.9" |
|||
|
|||
export APP_LIGHTNING_NODE_PORT="9735" |
|||
export APP_LIGHTNING_NODE_GRPC_PORT="10009" |
|||
export APP_LIGHTNING_NODE_REST_PORT="8080" |
|||
export APP_LIGHTNING_NODE_DATA_DIR="${EXPORTS_APP_DIR}/data/lnd" |
|||
|
|||
LND_BITCOIN_NODE="bitcoind" |
|||
|
|||
BIN_ARGS=() |
|||
# [Application Options] |
|||
BIN_ARGS+=( "--listen=0.0.0.0:${APP_LIGHTNING_NODE_PORT}" ) |
|||
BIN_ARGS+=( "--rpclisten=0.0.0.0:${APP_LIGHTNING_NODE_GRPC_PORT}" ) |
|||
BIN_ARGS+=( "--restlisten=0.0.0.0:${APP_LIGHTNING_NODE_REST_PORT}" ) |
|||
BIN_ARGS+=( "--tlsextraip=${APP_LIGHTNING_NODE_IP}" ) |
|||
BIN_ARGS+=( "--tlsextradomain=${DEVICE_DOMAIN_NAME}" ) |
|||
BIN_ARGS+=( "--tlsautorefresh" ) |
|||
BIN_ARGS+=( "--tlsdisableautofill" ) |
|||
|
|||
# [Bitcoind] |
|||
BIN_ARGS+=( "--bitcoind.rpchost=${APP_BITCOIN_NODE_IP}" ) |
|||
BIN_ARGS+=( "--bitcoind.rpcuser=${APP_BITCOIN_RPC_USER}" ) |
|||
BIN_ARGS+=( "--bitcoind.rpcpass=${APP_BITCOIN_RPC_PASS}" ) |
|||
BIN_ARGS+=( "--bitcoind.zmqpubrawblock=tcp://${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_ZMQ_RAWBLOCK_PORT}" ) |
|||
BIN_ARGS+=( "--bitcoind.zmqpubrawtx=tcp://${APP_BITCOIN_NODE_IP}:${APP_BITCOIN_ZMQ_RAWTX_PORT}" ) |
|||
|
|||
# [Bitcoin] |
|||
BIN_ARGS+=( "--bitcoin.active" ) |
|||
if [[ "${APP_BITCOIN_NETWORK}" == "mainnet" ]]; then |
|||
BIN_ARGS+=( "--bitcoin.mainnet" ) |
|||
elif [[ "${APP_BITCOIN_NETWORK}" == "testnet" ]]; then |
|||
BIN_ARGS+=( "--bitcoin.testnet" ) |
|||
elif [[ "${APP_BITCOIN_NETWORK}" == "signet" ]]; then |
|||
BIN_ARGS+=( "--bitcoin.signet" ) |
|||
elif [[ "${APP_BITCOIN_NETWORK}" == "regtest" ]]; then |
|||
BIN_ARGS+=( "--bitcoin.regtest" ) |
|||
else |
|||
echo "Warning (${EXPORTS_APP_ID}): Bitcoin Network '${APP_BITCOIN_NETWORK}' is not supported" |
|||
fi |
|||
BIN_ARGS+=( "--bitcoin.node=${LND_BITCOIN_NODE}" ) |
|||
|
|||
# [tor] |
|||
BIN_ARGS+=( "--tor.active" ) |
|||
BIN_ARGS+=( "--tor.v3" ) |
|||
BIN_ARGS+=( "--tor.control=${TOR_PROXY_IP}:29051" ) |
|||
BIN_ARGS+=( "--tor.socks=${TOR_PROXY_IP}:${TOR_PROXY_PORT}" ) |
|||
BIN_ARGS+=( "--tor.targetipaddress=${APP_LIGHTNING_NODE_IP}" ) |
|||
BIN_ARGS+=( "--tor.password=${TOR_PASSWORD}" ) |
|||
|
|||
export APP_LIGHTNING_COMMAND=$(IFS=" "; echo "${BIN_ARGS[@]}") |
|||
|
|||
# echo "${APP_LIGHTNING_COMMAND}" |
|||
|
|||
rest_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-rest/hostname" |
|||
grpc_hidden_service_file="${EXPORTS_TOR_DATA_DIR}/app-${EXPORTS_APP_ID}-grpc/hostname" |
|||
export APP_LIGHTNING_REST_HIDDEN_SERVICE="$(cat "${rest_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" |
|||
export APP_LIGHTNING_GRPC_HIDDEN_SERVICE="$(cat "${grpc_hidden_service_file}" 2>/dev/null || echo "notyetset.onion")" |
@ -0,0 +1,11 @@ |
|||
# LND REST Hidden Service |
|||
HiddenServiceDir /data/app-$APP_ID-rest |
|||
HiddenServicePort $APP_LIGHTNING_NODE_REST_PORT $APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_REST_PORT |
|||
|
|||
# LND gRPC Hidden Service |
|||
HiddenServiceDir /data/app-$APP_ID-grpc |
|||
HiddenServicePort $APP_LIGHTNING_NODE_GRPC_PORT $APP_LIGHTNING_NODE_IP:$APP_LIGHTNING_NODE_GRPC_PORT |
|||
|
|||
# LND Frontend Hidden Service |
|||
HiddenServiceDir /data/app-$APP_ID |
|||
HiddenServicePort 80 $APP_PROXY_HOSTNAME:$APP_PROXY_PORT |
@ -0,0 +1,20 @@ |
|||
manifestVersion: 1 |
|||
id: lightning |
|||
category: Finance |
|||
name: Lightning |
|||
version: v0.14.1-beta |
|||
tagline: LND is cool too |
|||
description: > |
|||
"there was lightning before the thunder" |
|||
developer: Umbrel |
|||
website: https://getumbrel.com/ |
|||
dependencies: [] |
|||
repo: https://github.com/getumbrel/lightning |
|||
support: https://github.com/getumbrel/lightning/issues |
|||
port: 10001 |
|||
gallery: |
|||
- 1.jpg |
|||
- 2.jpg |
|||
- 3.jpg |
|||
path: "" |
|||
defaultPassword: "" |
Loading…
Reference in new issue