$npx -y skills add lightninglabs/lightning-agent-tools --skill run-litdSetting up a Bitcoin Lightning node on Ubuntu using litd (Lightning Terminal). Default path: Neutrino-backed single node (fast, no bitcoind needed). Also covers bitcoind-backed routing nodes and the remote signer architecture for production.
| 1 | # Run litd — Node Setup & Remote Signer |
| 2 | |
| 3 | Reference for setting up litd (Lightning Terminal) and LND on Ubuntu, including the recommended remote signer architecture that separates key-holding from routing. |
| 4 | |
| 5 | Tested on Ubuntu 24.04 LTS. Current target versions: **bitcoind v31.0**, **litd v0.16.1-alpha**, **LND v0.20.1-beta**. |
| 6 | |
| 7 | Source scripts: https://github.com/HannahMR/run-litd |
| 8 | |
| 9 | --- |
| 10 | |
| 11 | ## Architecture Overview |
| 12 | |
| 13 | | Role | Software | Holds keys? | Internet-exposed? | |
| 14 | |------|----------|-------------|-------------------| |
| 15 | | **Single node** | litd (integrated) | Yes | Yes | |
| 16 | | **Signer node** | LND (standalone) | Yes — wallet + private keys | No — ideally on private network | |
| 17 | | **Routing node** | litd (watch-only) | No | Yes — public Lightning node | |
| 18 | |
| 19 | The remote signer architecture is recommended for production: the signer holds keys and is never internet-exposed; the routing node handles payments. Three files transfer from signer to routing node: `tls.cert` (rename to `signer-tls.cert`), `signer.macaroon`, `accounts.json`. |
| 20 | |
| 21 | --- |
| 22 | |
| 23 | ## Node Setup Options |
| 24 | |
| 25 | | | Neutrino (default) | bitcoind | |
| 26 | |---|---|---| |
| 27 | | **Bitcoin backend** | Lightweight SPV, built into LND | Full node | |
| 28 | | **Disk required** | ~1 GB | 80 GB+ pruned / 800 GB+ full | |
| 29 | | **Sync time** | Minutes | Hours–days | |
| 30 | | **Mainnet routing** | Not recommended | ✓ | |
| 31 | | **Signet / dev** | ✓ Ideal | ✓ | |
| 32 | |
| 33 | **Default behaviour:** unless the user explicitly asks for bitcoind or a source build, always use the Neutrino binary path. |
| 34 | |
| 35 | --- |
| 36 | |
| 37 | ## Server Requirements |
| 38 | |
| 39 | - Ubuntu 24.04 LTS (also tested on 22.04) |
| 40 | - 2+ CPU cores, 4 GB+ RAM |
| 41 | - Storage: ~10 GB for Neutrino; 80 GB+ for pruned bitcoind node; 800 GB+ for full mainnet node |
| 42 | - For attached-disk full nodes, set `datadir=/path/to/disk` in `bitcoin.conf` |
| 43 | |
| 44 | --- |
| 45 | |
| 46 | ## Before You Begin |
| 47 | |
| 48 | ### Step 1 — Check sudo access |
| 49 | |
| 50 | The setup scripts require root to install binaries to `/usr/local/bin/`, install packages via `apt-get`, write systemd service files to `/etc/systemd/system/`, and run `systemctl` commands. Check that passwordless sudo is working before doing anything else: |
| 51 | |
| 52 | ```bash |
| 53 | sudo -n true 2>/dev/null && echo "OK" || echo "NEEDS_SETUP" |
| 54 | ``` |
| 55 | |
| 56 | If the output is `NEEDS_SETUP`, explain to the user why these permissions are needed — the setup scripts must install binaries to `/usr/local/bin/`, install packages via `apt-get`, write systemd service files to `/etc/systemd/system/`, and run `systemctl` commands, all of which require root. Claude cannot enter a password interactively, so passwordless sudo must be configured first. Then ask them to run the fix: |
| 57 | |
| 58 | > "I need you to open a new SSH terminal tab and paste these two commands, then let me know when done. This is a one-time setup for this server. Note that each command pipes through `sudo tee` — the `sudo` is required to write to `/etc/sudoers.d/`, so you will be prompted for your password. Do not remove `sudo` from the commands." |
| 59 | > |
| 60 | > ```bash |
| 61 | > echo 'Defaults:ubuntu !use_pty' | sudo tee /etc/sudoers.d/ubuntu-nopty > /dev/null |
| 62 | > sudo chmod 0440 /etc/sudoers.d/ubuntu-nopty |
| 63 | > ``` |
| 64 | > ```bash |
| 65 | > echo 'ubuntu ALL=(ALL) NOPASSWD: ALL' | sudo tee /etc/sudoers.d/ubuntu-nopasswd > /dev/null |
| 66 | > sudo chmod 0440 /etc/sudoers.d/ubuntu-nopasswd |
| 67 | > ``` |
| 68 | |
| 69 | Wait for the user to confirm, then re-run `sudo -n true` to verify before continuing. |
| 70 | |
| 71 | ### Step 2 — Gather setup details |
| 72 | |
| 73 | Ask the user: |
| 74 | 1. Which network — **signet** (testing) or **mainnet** (production)? |
| 75 | 2. Which role is this machine — **single node**, **signer node**, or **routing node**? |
| 76 | |
| 77 | **Default behaviour:** use the Neutrino binary path unless the user explicitly asks for bitcoind or a source build. Neutrino is built into LND — no separate Bitcoin node or service needed. It is ideal for signet and development but not recommended for mainnet production routing nodes due to peer dependency. |
| 78 | |
| 79 | Once you have the answers, run `sudo -v` to cache credentials, then jump to the relevant section below. |
| 80 | |
| 81 | --- |
| 82 | |
| 83 | ## Neutrino Setup (Default) |
| 84 | |
| 85 | Neutrino is a lightweight SPV Bitcoin client built into LND — no bitcoind installation required. litd still needs its own `lit.conf` and systemd service; `neutrino_setup3.sh` handles both. |
| 86 | |
| 87 | **Important:** the setup scripts use interactive `read` prompts that Claude CLI cannot respond to. Generate the config files directly before running the scripts — each script checks for existing files and skips the interactive config section automatically. |
| 88 | |
| 89 | ### Single node (litd + Neutrino) |
| 90 | |
| 91 | This path installs litd with a Neutrino backend. litd provides the web UI and integrated LND node. |
| 92 | |
| 93 | **Before running the script**, ask the user for: |
| 94 | - A UI password (for the litd web interface) |
| 95 | - A node alias |
| 96 | |
| 97 | Then generate the config files using the Bash tool. Read `${CLAUDE_SKILL_DIR} |