Awesome
Torq
Torq is an advanced node management software that helps lightning node operators analyze and automate their nodes. It is designed to handle large nodes with over 1000 channels, and it offers a range of features to simplify your node management tasks, including:
- Analyze, connect and manage all your nodes from one place!
- Access a complete overview of all channels instantly.
- Build advanced automation workflows to automate Rebalancing, Channel Policy, Tagging and eventually any node action.
- Review forwarding history, both current and at any point in history.
- Customize and save table views. Containing only selected columns, advanced sorting and high fidelity filters.
- Export table data as CSV. Finally get all your forwarding or channel data as CSV files.
- Enjoy advanced charts to visualize your node's performance and make informed decisions.
Whether you're running a small or a large node, Torq can help you optimize its performance and streamline your node management process. Give it a try and see how it can simplify your node management tasks.
Quick start
Docker compose
To install Torq via docker compose:
bash -c "$(curl -fsSL https://torq.sh)"
You do not need sudo/root to run this, and you can check the contents of the installation script here: https://torq.sh
When you:
- Have a firewall
- Run Torq in a container
- Need to access LND or CLN on the host
- Are not using host network configuration for the container
Then make sure to allow docker bridge network traffic i.e. sudo ufw allow from 172.16.0.0/12
Podman
To run the database via host network:
podman run -d --name torqdb --network=host -v torq_db:/var/lib/postgresql/data -e POSTGRES_PASSWORD="<YourPostgresPasswordHere>" timescale/timescaledb:latest-pg14
To run Torq via host network:
First create your TOML configuration file and store it in ~/.torq/torq.conf
podman run -d --name torq --network=host -v ~/.torq/torq.conf:/home/torq/torq.conf lncapital/torq:latest --config=/home/torq/torq.conf start
Note: Only run with host network when your server has a firewall and doesn't automatically open all port to the internet. You don't want the database to be accessible from the internet!
Kubernetes
We shared templates for CRDs in folder kubernetes. This folder also has its own readme.
Network
Be aware that when you try Torq on testnet, simnet or some other type of network that you must use the network switch when trying to browse the web interface. The network switch is the globe icon in the top left corner, next to the Torq logo.
Guides
We're adding more guides and help articles on docs.torq.co.
Configuration
Torq supports a TOML configuration file. The docker compose install script auto generates this file. You can find an example configuration file at example-torq.conf
It is also possible not to use any TOML configuration files and use command like parameters or environment variables. The list of parameters are:
- --lnd.url: (optional) Host:Port of the LND node (example: "127.0.0.1:10009")
- --lnd.macaroon-path: (optional) Path on disk to LND Macaroon (example: "~/.lnd/admin.macaroon")
- --lnd.tls-path: (optional) Path on disk to LND TLS file (example: "~/.lnd/tls.cert")
- --cln.url: (optional) Host:Port of the CLN node (example: "127.0.0.1:17272")
- --cln.certificate-path: (optional) Path on disk to CLN client certificate file (example: "~/.cln/client.pem")
- --cln.key-path: (optional) Path on disk to CLN client key file (example: "~/.cln/client-key.pem")
- --cln.ca-certificate-path: (optional) Path on disk to CLN certificate authority file (example: "~/.cln/ca.pem")
- --db.name: (optional) Name of the database (default: "torq")
- --db.user: (optional) Name of the postgres user with access to the database (default: "postgres")
- --db.password: (optional) Password used to access the database (default: "runningtorq")
- --db.port: (optional) Port of the database (default: "5432")
- --db.host: (optional) Host of the database (default: "localhost")
- --torq.password: Password used to access the API and frontend (example: "C44y78A4JXHCVziRcFqaJfFij5HpJhF6VwKjz4vR")
- --torq.network-interface: (optional) The nework interface to serve the HTTP API (default: "0.0.0.0")
- --torq.port: (optional) Port to serve the HTTP API (default: "8080")
- --torq.pprof.path: (optional) When pprof path is set then pprof is loaded when Torq boots. (example: ":6060"). See Note
- --torq.prometheus.path: (optional) When prometheus path is set then prometheus is loaded when Torq boots. (example: "localhost:7070"). See Note
- --torq.debuglevel: (optional) Specify different debug levels (panic|fatal|error|warn|info|debug|trace) (default: "info")
- --torq.vector.url: (optional) Alternative path for alternative vector service implementation (default: "https://vector.ln.capital/")
- --torq.cookie-path: (optional) Path to auth cookie file
- --torq.no-sub: (optional) Start the server without subscribing to node data (default: "false")
- --torq.auto-login: (optional) Allows logging in without a password (default: "false")
- --customize.mempool.url: (optional) Mempool custom URL (no trailing slash) (default: "https://mempool.space")
- --customize.electrum.path: (optional) Electrum path (example: "localhost:50001")
- --otel.exporter.type: (optional) OpenTelemetry exporter type: stdout/file/jaeger (default: "stdout")
- --otel.exporter.endpoint: (optional) OpenTelemetry exporter endpoint
- --otel.exporter.path: (optional) OpenTelemetry exporter path (default: "traces.txt")
- --otel.sampler.fraction: (optional) OpenTelemetry sampler fraction (default: "0.0")
- --bitcoind.network: (optional) Bitcoind network: MainNet/TestNet/RegTest/SigNet/SimNet. (default: "MainNet")
- --bitcoind.url: (optional) Bitcoind RPC Host:Port
- --bitcoind.user: (optional) Bitcoind RPC username
- --bitcoind.password: (optional) Bitcoind RPC password
Note: pprof and prometheus expose internal statistics, be careful not to expose this publicly.
More information about infrastructure and node monitoring over here
How to Videos
You can find the full list of video guides here.
How to create custom Channel Views
How to use Automation Workflows
How to use the Forwards Tab
LND Permissions
Since Torq is built to manage your node, it needs most/all permissions to be fully functional. However, if you want to be extra careful you can disable some permissions that are not strictly needed.
Torq does not for now need the ability to create new macaroon or stop the LND daemon,
lncli bakemacaroon \
invoices:read \
invoices:write \
onchain:read \
onchain:write \
offchain:read \
offchain:write \
address:read \
address:write \
message:read \
message:write \
peers:read \
peers:write \
info:read \
uri:/lnrpc.Lightning/UpdateChannelPolicy \
--save_to=torq.macaroon
Here is an example of a macaroon that can be used if you want to prevent all actions that sends funds from your node:
lncli bakemacaroon \
invoices:read \
invoices:write \
onchain:read \
offchain:read \
address:read \
address:write \
message:read \
message:write \
peers:read \
peers:write \
info:read \
uri:/lnrpc.Lightning/UpdateChannelPolicy \
--save_to=torq.macaroon
CLN
We support CLN nodes (Except HTLC firewall). Make sure your CLN node is compatible with the version of Torq (See Compatibility).
You will have to have RUST active and also specify --grpc-port
which should generate the appropriate mTLS certificates.
You need to provide these certificates once Torq is running (or as boot parameter or in the configuration file)
Compatibility
Torq v2.0.0
and up are compatible with CLN v24.05.*
and LND v0.18.2+
Torq v1.5.0
<-> v1.6.1
are compatible with CLN v23.11.*
Torq v1.2.0
<-> v1.4.3
are compatible with CLN v23.08.1+
Torq v0.22.1
<-> v1.1.5
are all compatible with CLN v23.05.*
Help and feedback
Join our Telegram group if you need help getting started. Feel free to ping us in the telegram group if you have any feature request or feedback. We would also love to hear your ideas for features or any other feedback you might have.