2023-01-15 02:46:19 +01:00
|
|
|
#For more information on .env files, their content and format: https://pypi.org/project/python-dotenv/
|
|
|
|
|
2024-02-09 13:34:10 +01:00
|
|
|
######################################
|
|
|
|
########### Admin Settings ###########
|
|
|
|
######################################
|
|
|
|
|
|
|
|
# Enable Admin GUI, available for the first user in LNBITS_ADMIN_USERS if available.
|
|
|
|
# Warning: Enabling this will make LNbits ignore most configurations in file. Only the
|
|
|
|
# configurations defined in `ReadOnlySettings` will still be read from the environment variables.
|
2024-02-14 09:23:37 +01:00
|
|
|
# The rest of the settings will be stored in your database and you will be able to change them
|
2024-02-09 13:34:10 +01:00
|
|
|
# only through the Admin UI.
|
|
|
|
# Disable this to make LNbits use this config file again.
|
|
|
|
LNBITS_ADMIN_UI=false
|
|
|
|
|
|
|
|
# Change theme
|
|
|
|
LNBITS_SITE_TITLE="LNbits"
|
|
|
|
LNBITS_SITE_TAGLINE="free and open-source lightning wallet"
|
2024-04-30 09:08:57 +02:00
|
|
|
LNBITS_SITE_DESCRIPTION="The world's most powerful suite of bitcoin tools. Run for yourself, for others, or as part of a stack."
|
2024-02-09 13:34:10 +01:00
|
|
|
# Choose from bitcoin, mint, flamingo, freedom, salvador, autumn, monochrome, classic, cyber
|
|
|
|
LNBITS_THEME_OPTIONS="classic, bitcoin, flamingo, freedom, mint, autumn, monochrome, salvador, cyber"
|
|
|
|
# LNBITS_CUSTOM_LOGO="https://lnbits.com/assets/images/logo/logo.svg"
|
|
|
|
|
|
|
|
HOST=127.0.0.1
|
|
|
|
PORT=5000
|
|
|
|
|
2023-11-21 12:26:53 +01:00
|
|
|
######################################
|
|
|
|
########## Funding Source ############
|
|
|
|
######################################
|
2021-06-28 23:57:23 +02:00
|
|
|
|
2023-08-23 08:59:39 +02:00
|
|
|
# which fundingsources are allowed in the admin ui
|
2024-08-07 09:56:53 +02:00
|
|
|
LNBITS_ALLOWED_FUNDING_SOURCES="VoidWallet, FakeWallet, CoreLightningWallet, CoreLightningRestWallet, LndRestWallet, EclairWallet, LndWallet, LnTipsWallet, LNPayWallet, LNbitsWallet, BlinkWallet, AlbyWallet, ZBDWallet, PhoenixdWallet, OpenNodeWallet, NWCWallet, BreezSdkWallet"
|
2023-08-23 08:59:39 +02:00
|
|
|
|
2022-08-01 09:58:21 +02:00
|
|
|
LNBITS_BACKEND_WALLET_CLASS=VoidWallet
|
2020-10-02 19:53:55 +02:00
|
|
|
# VoidWallet is just a fallback that works without any actual Lightning capabilities,
|
|
|
|
# just so you can see the UI before dealing with this file.
|
2020-04-16 17:10:53 +02:00
|
|
|
|
2024-04-11 18:29:25 +02:00
|
|
|
# How many times to retry connectiong to the Funding Source before defaulting to the VoidWallet
|
|
|
|
# FUNDING_SOURCE_MAX_RETRIES=4
|
|
|
|
|
2023-01-26 11:08:40 +01:00
|
|
|
# Invoice expiry for LND, CLN, Eclair, LNbits funding sources
|
2023-07-19 13:13:46 +02:00
|
|
|
LIGHTNING_INVOICE_EXPIRY=3600
|
2023-01-26 11:08:40 +01:00
|
|
|
|
2020-10-02 19:53:55 +02:00
|
|
|
# Set one of these blocks depending on the wallet kind you chose above:
|
2022-08-01 00:46:42 +02:00
|
|
|
|
2022-08-01 00:51:57 +02:00
|
|
|
# ClicheWallet
|
|
|
|
CLICHE_ENDPOINT=ws://127.0.0.1:12000
|
2022-08-01 00:46:42 +02:00
|
|
|
|
2020-10-02 19:53:55 +02:00
|
|
|
# SparkWallet
|
|
|
|
SPARK_URL=http://localhost:9737/rpc
|
|
|
|
SPARK_TOKEN=myaccesstoken
|
|
|
|
|
2022-08-01 16:41:50 +02:00
|
|
|
# CoreLightningWallet
|
|
|
|
CORELIGHTNING_RPC="/home/bob/.lightning/bitcoin/lightning-rpc"
|
2020-04-16 17:10:53 +02:00
|
|
|
|
2023-09-12 12:14:47 +02:00
|
|
|
# CoreLightningRestWallet
|
|
|
|
CORELIGHTNING_REST_URL=http://127.0.0.1:8185/
|
2023-10-26 16:48:57 +02:00
|
|
|
CORELIGHTNING_REST_MACAROON="/path/to/clnrest/access.macaroon" # or BASE64/HEXSTRING
|
2023-09-12 12:14:47 +02:00
|
|
|
CORELIGHTNING_REST_CERT="/path/to/clnrest/tls.cert"
|
|
|
|
|
2020-10-02 19:53:55 +02:00
|
|
|
# LnbitsWallet
|
2024-05-16 10:05:22 +02:00
|
|
|
LNBITS_ENDPOINT=https://demo.lnbits.com
|
2020-10-08 21:03:18 +02:00
|
|
|
LNBITS_KEY=LNBITS_ADMIN_KEY
|
2020-03-31 19:05:25 +02:00
|
|
|
|
2023-01-14 12:31:00 +01:00
|
|
|
# LndWallet
|
|
|
|
LND_GRPC_ENDPOINT=127.0.0.1
|
|
|
|
LND_GRPC_PORT=10009
|
2023-10-26 16:48:57 +02:00
|
|
|
LND_GRPC_CERT="/home/bob/.lnd/tls.cert"
|
|
|
|
LND_GRPC_MACAROON="/home/bob/.lnd/data/chain/bitcoin/mainnet/admin.macaroon" # or HEXSTRING
|
2023-01-14 12:31:00 +01:00
|
|
|
# To use an AES-encrypted macaroon, set
|
|
|
|
# LND_GRPC_MACAROON="eNcRyPtEdMaCaRoOn"
|
|
|
|
|
2020-10-02 19:53:55 +02:00
|
|
|
# LndRestWallet
|
2020-10-03 22:27:55 +02:00
|
|
|
LND_REST_ENDPOINT=https://127.0.0.1:8080/
|
2023-10-26 16:48:57 +02:00
|
|
|
LND_REST_CERT="/home/bob/.lnd/tls.cert"
|
|
|
|
LND_REST_MACAROON="/home/bob/.lnd/data/chain/bitcoin/mainnet/admin.macaroon" # or HEXSTRING
|
2022-03-07 06:03:32 +01:00
|
|
|
# To use an AES-encrypted macaroon, set
|
2022-02-14 17:54:05 +01:00
|
|
|
# LND_REST_MACAROON_ENCRYPTED="eNcRyPtEdMaCaRoOn"
|
2020-04-25 23:39:30 +02:00
|
|
|
|
2020-10-02 19:53:55 +02:00
|
|
|
# LNPayWallet
|
2021-04-11 22:06:39 +02:00
|
|
|
LNPAY_API_ENDPOINT=https://api.lnpay.co/v1/
|
2021-06-04 20:24:14 +02:00
|
|
|
# Secret API Key under developers tab
|
2020-04-16 17:10:53 +02:00
|
|
|
LNPAY_API_KEY=LNPAY_API_KEY
|
2021-06-04 20:24:14 +02:00
|
|
|
# Wallet Admin in Wallet Access Keys
|
2020-10-08 21:03:18 +02:00
|
|
|
LNPAY_WALLET_KEY=LNPAY_ADMIN_KEY
|
2020-04-03 12:24:49 +02:00
|
|
|
|
2023-11-14 20:28:25 +01:00
|
|
|
# AlbyWallet
|
|
|
|
ALBY_API_ENDPOINT=https://api.getalby.com/
|
|
|
|
ALBY_ACCESS_TOKEN=ALBY_ACCESS_TOKEN
|
|
|
|
|
2024-02-02 01:10:15 +01:00
|
|
|
# ZBDWallet
|
|
|
|
ZBD_API_ENDPOINT=https://api.zebedee.io/v0/
|
|
|
|
ZBD_API_KEY=ZBD_ACCESS_TOKEN
|
|
|
|
|
2024-07-19 22:32:02 +02:00
|
|
|
# BlinkWallet
|
|
|
|
BLINK_API_ENDPOINT=https://api.blink.sv/graphql
|
|
|
|
BLINK_WS_ENDPOINT=wss://ws.blink.sv/graphql
|
|
|
|
BLINK_TOKEN=BLINK_TOKEN
|
|
|
|
|
2024-04-26 10:18:38 +02:00
|
|
|
# PhoenixdWallet
|
|
|
|
PHOENIXD_API_ENDPOINT=http://localhost:9740/
|
|
|
|
PHOENIXD_API_PASSWORD=PHOENIXD_KEY
|
|
|
|
|
2020-10-02 19:53:55 +02:00
|
|
|
# OpenNodeWallet
|
2020-01-12 01:46:09 +01:00
|
|
|
OPENNODE_API_ENDPOINT=https://api.opennode.com/
|
2020-10-08 21:03:18 +02:00
|
|
|
OPENNODE_KEY=OPENNODE_ADMIN_KEY
|
2022-01-31 12:07:29 +01:00
|
|
|
|
|
|
|
# FakeWallet
|
2022-02-03 13:52:51 +01:00
|
|
|
FAKE_WALLET_SECRET="ToTheMoon1"
|
2022-05-05 16:55:01 +02:00
|
|
|
LNBITS_DENOMINATION=sats
|
|
|
|
|
|
|
|
# EclairWallet
|
|
|
|
ECLAIR_URL=http://127.0.0.1:8283
|
2022-10-02 17:45:16 +02:00
|
|
|
ECLAIR_PASS=eclairpw
|
2022-10-10 16:12:06 +02:00
|
|
|
|
2024-08-07 09:56:53 +02:00
|
|
|
# NWCWalllet
|
|
|
|
NWC_PAIRING_URL="nostr+walletconnect://000...000?relay=example.com&secret=123"
|
|
|
|
|
2022-10-10 16:12:06 +02:00
|
|
|
# LnTipsWallet
|
|
|
|
# Enter /api in LightningTipBot to get your key
|
|
|
|
LNTIPS_API_KEY=LNTIPS_ADMIN_KEY
|
|
|
|
LNTIPS_API_ENDPOINT=https://ln.tips
|
2023-11-21 12:26:53 +01:00
|
|
|
|
2024-08-06 10:06:21 +02:00
|
|
|
# BreezSdkWallet
|
|
|
|
BREEZ_API_KEY=KEY
|
|
|
|
BREEZ_GREENLIGHT_SEED=SEED
|
|
|
|
# A Greenlight invite code or Greenlight partner certificate/key can be used
|
|
|
|
BREEZ_GREENLIGHT_INVITE_CODE=CODE
|
|
|
|
BREEZ_GREENLIGHT_DEVICE_KEY="/path/to/breezsdk/device.pem" # or BASE64/HEXSTRING
|
|
|
|
BREEZ_GREENLIGHT_DEVICE_CERT="/path/to/breezsdk/device.crt" # or BASE64/HEXSTRING
|
|
|
|
|
2023-12-12 11:38:19 +01:00
|
|
|
######################################
|
|
|
|
####### Auth Configurations ##########
|
|
|
|
######################################
|
|
|
|
# Secret Key: will default to the hash of the super user. It is strongly recommended that you set your own value.
|
|
|
|
AUTH_SECRET_KEY=""
|
|
|
|
AUTH_TOKEN_EXPIRE_MINUTES=525600
|
2024-02-14 09:23:37 +01:00
|
|
|
# Possible authorization methods: user-id-only, username-password, google-auth, github-auth, keycloak-auth
|
2023-12-12 11:38:19 +01:00
|
|
|
AUTH_ALLOWED_METHODS="user-id-only, username-password"
|
|
|
|
# Set this flag if HTTP is used for OAuth
|
|
|
|
# OAUTHLIB_INSECURE_TRANSPORT="1"
|
|
|
|
|
|
|
|
# Google OAuth Config
|
2024-02-14 09:23:37 +01:00
|
|
|
# Make sure that the authorized redirect URIs contain https://{domain}/api/v1/auth/google/token
|
2023-12-12 11:38:19 +01:00
|
|
|
GOOGLE_CLIENT_ID=""
|
|
|
|
GOOGLE_CLIENT_SECRET=""
|
|
|
|
|
|
|
|
# GitHub OAuth Config
|
2024-02-14 09:23:37 +01:00
|
|
|
# Make sure that the authorization callback URL is set to https://{domain}/api/v1/auth/github/token
|
2023-12-12 11:38:19 +01:00
|
|
|
GITHUB_CLIENT_ID=""
|
|
|
|
GITHUB_CLIENT_SECRET=""
|
|
|
|
|
2024-02-14 09:23:37 +01:00
|
|
|
# Keycloak OAuth Config
|
|
|
|
# Make sure that the valid redirect URIs contain https://{domain}/api/v1/auth/keycloak/token
|
|
|
|
KEYCLOAK_CLIENT_ID=""
|
|
|
|
KEYCLOAK_CLIENT_SECRET=""
|
|
|
|
KEYCLOAK_DISCOVERY_URL=""
|
|
|
|
|
|
|
|
|
2023-12-12 11:38:19 +01:00
|
|
|
######################################
|
|
|
|
|
2023-11-21 12:26:53 +01:00
|
|
|
# uvicorn variable, uncomment to allow https behind a proxy
|
2024-04-05 14:55:26 +02:00
|
|
|
# IMPORTANT: this also needs the webserver to be configured to forward the headers
|
|
|
|
# http://docs.lnbits.org/guide/installation.html#running-behind-an-apache2-reverse-proxy-over-https
|
2023-11-21 12:26:53 +01:00
|
|
|
# FORWARDED_ALLOW_IPS="*"
|
|
|
|
|
|
|
|
# Server security, rate limiting ips, blocked ips, allowed ips
|
|
|
|
LNBITS_RATE_LIMIT_NO="200"
|
|
|
|
LNBITS_RATE_LIMIT_UNIT="minute"
|
|
|
|
LNBITS_ALLOWED_IPS=""
|
|
|
|
LNBITS_BLOCKED_IPS=""
|
|
|
|
|
|
|
|
# Allow users and admins by user IDs (comma separated list)
|
|
|
|
# if set new users will not be able to create accounts
|
|
|
|
LNBITS_ALLOWED_USERS=""
|
|
|
|
LNBITS_ADMIN_USERS=""
|
|
|
|
# ID of the super user. The user ID must exist.
|
|
|
|
# SUPER_USER=""
|
|
|
|
|
|
|
|
# Extensions only admin can access
|
|
|
|
LNBITS_ADMIN_EXTENSIONS="ngrok, admin"
|
2024-07-09 14:55:05 +02:00
|
|
|
# Extensions enabled by default when a user is created
|
|
|
|
LNBITS_USER_DEFAULT_EXTENSIONS="lnurlp"
|
2023-11-21 12:26:53 +01:00
|
|
|
|
2024-01-22 11:18:12 +01:00
|
|
|
# Start LNbits core only. The extensions are not loaded.
|
|
|
|
# LNBITS_EXTENSIONS_DEACTIVATE_ALL=true
|
|
|
|
|
2023-11-21 12:26:53 +01:00
|
|
|
# Disable account creation for new users
|
|
|
|
# LNBITS_ALLOW_NEW_ACCOUNTS=false
|
|
|
|
|
|
|
|
# Enable Node Management without activating the LNBITS Admin GUI
|
|
|
|
# by setting the following variables to true.
|
|
|
|
LNBITS_NODE_UI=false
|
|
|
|
LNBITS_PUBLIC_NODE_UI=false
|
|
|
|
# Enabling the transactions tab can cause crashes on large Core Lightning nodes.
|
|
|
|
LNBITS_NODE_UI_TRANSACTIONS=false
|
|
|
|
|
|
|
|
LNBITS_DEFAULT_WALLET_NAME="LNbits wallet"
|
|
|
|
|
|
|
|
# Ad space description
|
|
|
|
# LNBITS_AD_SPACE_TITLE="Supported by"
|
|
|
|
# csv ad space, format "<url>;<img-light>;<img-dark>, <url>;<img-light>;<img-dark>", extensions can choose to honor
|
|
|
|
# LNBITS_AD_SPACE="https://shop.lnbits.com/;https://raw.githubusercontent.com/lnbits/lnbits/main/lnbits/static/images/lnbits-shop-light.png;https://raw.githubusercontent.com/lnbits/lnbits/main/lnbits/static/images/lnbits-shop-dark.png"
|
2024-04-30 09:08:57 +02:00
|
|
|
# LNBITS_SHOW_HOME_PAGE_ELEMENTS=true # if set to true, the ad space will be displayed on the home page
|
2024-05-16 10:05:22 +02:00
|
|
|
# LNBITS_CUSTOM_BADGE="USE WITH CAUTION - LNbits wallet is still in BETA"
|
2024-04-30 09:08:57 +02:00
|
|
|
# LNBITS_CUSTOM_BADGE_COLOR="warning"
|
2023-11-21 12:26:53 +01:00
|
|
|
|
|
|
|
# Hides wallet api, extensions can choose to honor
|
|
|
|
LNBITS_HIDE_API=false
|
|
|
|
|
|
|
|
# LNBITS_EXTENSIONS_MANIFESTS="https://raw.githubusercontent.com/lnbits/lnbits-extensions/main/extensions.json,https://raw.githubusercontent.com/lnbits/lnbits-extensions/main/extensions-trial.json"
|
|
|
|
# GitHub has rate-limits for its APIs. The limit can be increased specifying a GITHUB_TOKEN
|
|
|
|
# LNBITS_EXT_GITHUB_TOKEN=github_pat_xxxxxxxxxxxxxxxxxx
|
|
|
|
|
|
|
|
# Path where extensions will be installed (defaults to `./lnbits/`).
|
|
|
|
# Inside this directory the `extensions` and `upgrades` sub-directories will be created.
|
|
|
|
# LNBITS_EXTENSIONS_PATH="/path/to/some/dir"
|
|
|
|
|
|
|
|
# Extensions to be installed by default. If an extension from this list is uninstalled then it will be re-installed on the next restart.
|
|
|
|
# The extension must be removed from this list in order to not be re-installed.
|
|
|
|
LNBITS_EXTENSIONS_DEFAULT_INSTALL="tpos"
|
|
|
|
|
|
|
|
# Database: to use SQLite, specify LNBITS_DATA_FOLDER
|
|
|
|
# to use PostgreSQL, specify LNBITS_DATABASE_URL=postgres://...
|
|
|
|
# to use CockroachDB, specify LNBITS_DATABASE_URL=cockroachdb://...
|
|
|
|
# for both PostgreSQL and CockroachDB, you'll need to install
|
|
|
|
# psycopg2 as an additional dependency
|
|
|
|
LNBITS_DATA_FOLDER="./data"
|
|
|
|
# LNBITS_DATABASE_URL="postgres://user:password@host:port/databasename"
|
|
|
|
|
2023-12-12 11:17:36 +01:00
|
|
|
# the service fee (in percent)
|
|
|
|
LNBITS_SERVICE_FEE=0.0
|
|
|
|
# the wallet where fees go to
|
|
|
|
# LNBITS_SERVICE_FEE_WALLET=
|
|
|
|
# the maximum fee per transaction (in satoshis)
|
|
|
|
# LNBITS_SERVICE_FEE_MAX=1000
|
|
|
|
# disable fees for internal transactions
|
|
|
|
# LNBITS_SERVICE_FEE_IGNORE_INTERNAL=true
|
|
|
|
|
2023-11-21 12:26:53 +01:00
|
|
|
# value in millisats
|
|
|
|
LNBITS_RESERVE_FEE_MIN=2000
|
|
|
|
# value in percent
|
|
|
|
LNBITS_RESERVE_FEE_PERCENT=1.0
|
|
|
|
|
2024-02-09 16:25:53 +01:00
|
|
|
# limit the maximum balance for each wallet
|
|
|
|
# throw an error if the wallet attempts to create a new invoice
|
|
|
|
|
|
|
|
# LNBITS_WALLET_LIMIT_MAX_BALANCE=1000000
|
|
|
|
# LNBITS_WALLET_LIMIT_DAILY_MAX_WITHDRAW=1000000
|
|
|
|
# LNBITS_WALLET_LIMIT_SECS_BETWEEN_TRANS=60
|
|
|
|
|
2023-11-21 12:26:53 +01:00
|
|
|
# Limit fiat currencies allowed to see in UI
|
|
|
|
# LNBITS_ALLOWED_CURRENCIES="EUR, USD"
|
|
|
|
|
|
|
|
######################################
|
|
|
|
###### Logging and Development #######
|
|
|
|
######################################
|
|
|
|
|
|
|
|
DEBUG=false
|
2024-03-21 09:59:17 +01:00
|
|
|
DEBUG_DATABASE=false
|
2023-11-21 12:26:53 +01:00
|
|
|
BUNDLE_ASSETS=true
|
|
|
|
|
|
|
|
# logging into LNBITS_DATA_FOLDER/logs/
|
|
|
|
ENABLE_LOG_TO_FILE=true
|
|
|
|
|
|
|
|
# https://loguru.readthedocs.io/en/stable/api/logger.html#file
|
|
|
|
LOG_ROTATION="100 MB"
|
2023-11-21 22:30:52 +01:00
|
|
|
LOG_RETENTION="3 months"
|
2024-01-30 07:47:15 +01:00
|
|
|
|
|
|
|
# for database cleanup commands
|
|
|
|
# CLEANUP_WALLETS_DAYS=90
|