Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
a9f91ba
refactor to 040 wip
May 23, 2023
0e396b3
refactored 040 ready for PR
May 23, 2023
c3e97f3
main.ts bugfixes
May 24, 2023
fa34b43
sdk 0.4.0-rev0.lib0.rc7
Jun 19, 2023
f64e0e4
update sdk
MattDHill Sep 6, 2023
08b0f83
merge with master
Dominion5254 Mar 19, 2024
cd017eb
wip
Dominion5254 Mar 20, 2024
7f8c0d3
latest SDK changes
MattDHill Mar 20, 2024
773bf91
minor updates
MattDHill Mar 21, 2024
8bacdc1
properties and dynamic action
MattDHill Mar 22, 2024
0d6a7d1
storepath
MattDHill Mar 24, 2024
789ad36
restructure
MattDHill Apr 5, 2024
483797d
Merge branch 'master' of github.com:Start9Labs/lightning-terminal-sta…
MattDHill Apr 5, 2024
eee0fae
exclude .lnd dir
MattDHill Apr 5, 2024
dead9ea
restructure
MattDHill May 9, 2024
5eccbdf
update to latest sdk and new format
MattDHill Jun 25, 2024
36d8882
set lnd config values on init
Dominion5254 Jul 23, 2024
a263fca
update sdk
MattDHill Aug 4, 2024
1d01e55
update to sdk alpha11
Dominion5254 Oct 16, 2024
760e203
updates to lit.conf
Dominion5254 Oct 16, 2024
b76c53c
final fixes to lit.conf
Dominion5254 Oct 16, 2024
f22f0e9
finish file-model and minor fixes
Dominion5254 Oct 17, 2024
eb7abb9
update docker image to 0.13.4
Dominion5254 Oct 17, 2024
c49e1ef
correct instructions to builid from source
Dominion5254 Oct 17, 2024
c8e7192
update action for new response type and main for daemons
MattDHill Oct 22, 2024
b96521a
bump sdk
MattDHill Oct 31, 2024
c49ce7f
alpha 14
MattDHill Nov 13, 2024
b4c2f5a
alpha 16
MattDHill Nov 14, 2024
55d6d22
alpha 18, fix deps, compile deps
MattDHill Nov 20, 2024
de2b663
alpha 20
MattDHill Nov 21, 2024
433af96
alpha 21
MattDHill Nov 21, 2024
12ff730
alpha 22
MattDHill Nov 22, 2024
c525c91
alpha 23
MattDHill Dec 3, 2024
9f9cde7
beta 0
MattDHill Dec 5, 2024
d465b5b
beta 1
MattDHill Dec 6, 2024
0172cc2
beta 3
MattDHill Jan 14, 2025
db46cd0
update deps
MattDHill Jan 14, 2025
5e9ad9a
beta 9
MattDHill Feb 18, 2025
4d4ded5
bata 18
MattDHill Mar 15, 2025
80d0282
makefile
MattDHill Mar 15, 2025
0c7ad10
assets and makefile
MattDHill Mar 21, 2025
4426be9
beta 5
MattDHill Apr 21, 2025
b585ae4
update makefile
MattDHill Apr 21, 2025
5ac5176
beta 20
MattDHill May 10, 2025
d66dfa1
beta 24
MattDHill May 22, 2025
7fb95bf
beta 27
MattDHill Jun 7, 2025
e157f43
beta.30 and more
Dominion5254 Jun 20, 2025
21a9966
npm update
Dominion5254 Jun 20, 2025
d83f1a9
fix backup syntax
Dominion5254 Jun 20, 2025
b9a2c31
use actual lnd s9pk
Dominion5254 Jun 20, 2025
f94f76a
beta.32
Dominion5254 Jul 1, 2025
c5a119a
beta.36
Dominion5254 Aug 15, 2025
1936a2e
require latest lnd
Dominion5254 Aug 15, 2025
530d9df
add docsUrl
Dominion5254 Aug 15, 2025
061fc92
update latest lnd s9pk dependency
Dominion5254 Aug 15, 2025
4428850
mount at /root
Dominion5254 Aug 15, 2025
74c9190
fix trim on undefined key
Dominion5254 Aug 15, 2025
ce84cab
fix lid mount
Dominion5254 Aug 15, 2025
1a92d45
fix lnd mount path
Dominion5254 Aug 15, 2025
1da42e5
default password to null
Dominion5254 Aug 18, 2025
d163d6f
trigger password setting in main instead of infinite loop on init
Dominion5254 Aug 18, 2025
b31af41
displayPassword action
Dominion5254 Aug 18, 2025
b2d08c6
typo fix
Dominion5254 Aug 18, 2025
06aaae3
update to 0.15.2
Dominion5254 Aug 22, 2025
6bc31cf
docs
Dominion5254 Aug 22, 2025
05e4f3c
multi-arch build
Dominion5254 Aug 22, 2025
14033ba
alpha.0 pre-release tag
Dominion5254 Aug 22, 2025
4c08095
remove displayPassword action for uniformity
Dominion5254 Aug 29, 2025
493650e
resetPass on preInstall
Dominion5254 Sep 1, 2025
6974bf4
use latest lnd s9pk
Dominion5254 Sep 2, 2025
5ca7a92
use root mountpoint and correct lit.conf subpath
Dominion5254 Sep 2, 2025
03546a2
fix 0351 migration
Dominion5254 Sep 2, 2025
8a917bc
latest CI actions
Dominion5254 Sep 3, 2025
c9f7b90
alpha.1
Dominion5254 Sep 3, 2025
fe60ae2
npm update
Dominion5254 Sep 17, 2025
1ac97e2
bump lnd dep version
Dominion5254 Sep 17, 2025
6a3c85c
bump package version
Dominion5254 Sep 17, 2025
f9b76b4
update lnd s9pk to latest
Dominion5254 Sep 17, 2025
9b53c16
latest makefile
Dominion5254 Sep 18, 2025
18d0085
remove instructions.md from root
Dominion5254 Sep 18, 2025
6cdd655
beta.42
Dominion5254 Nov 5, 2025
584c51c
make multihost id backwards compatible
Dominion5254 Nov 5, 2025
0b04639
bump lnd s9pk link to latest
Dominion5254 Nov 5, 2025
5382a8a
bump package pre-release to beta.0
Dominion5254 Nov 5, 2025
ddb0dc9
update upstream to v0.15.3-alpha
Dominion5254 Nov 5, 2025
8e4a0ea
latest makefile
Dominion5254 Nov 20, 2025
89b45ea
beta.44
Dominion5254 Nov 20, 2025
8e106c8
latest CI
Dominion5254 Nov 20, 2025
5c256f9
bump pre-release
Dominion5254 Nov 20, 2025
814b0b1
use latest lnd s9pk
Dominion5254 Nov 20, 2025
acd5a09
beta.45 and npm update
Dominion5254 Dec 18, 2025
efe59f8
latest s9pk dep link
Dominion5254 Dec 18, 2025
14dd6ea
Latest CI and Makefile
Dominion5254 Dec 18, 2025
47ee30e
remove started arg
Dominion5254 Dec 18, 2025
276e66f
update to 0.16.0 and cleanup migrations
Dominion5254 Dec 18, 2025
0304c03
fix action display bug
Dominion5254 Dec 18, 2025
18b6c9e
workflows
MattDHill Dec 21, 2025
bc9c633
better migration
MattDHill Dec 22, 2025
718e105
fix js-yaml
MattDHill Dec 22, 2025
21c68ce
bump deps
Dominion5254 Dec 26, 2025
ac41752
Update/beta.48 (#48)
Dominion5254 Feb 6, 2026
e107622
README and more
Dominion5254 Feb 8, 2026
6a4ad51
beta 55
MattDHill Mar 4, 2026
10e0a4e
Move service package deps from devDependencies to dependencies
MattDHill Mar 4, 2026
a06ba9f
Update start-sdk to beta.57
MattDHill Mar 6, 2026
decc444
Update start-sdk to beta.58
MattDHill Mar 6, 2026
2b49e88
Fix packaging guide URL in CONTRIBUTING.md
MattDHill Mar 6, 2026
19eed05
Update start-sdk to beta.59
MattDHill Mar 10, 2026
a950b9b
Update start-sdk to beta.60
MattDHill Mar 16, 2026
6db03a8
Update start-sdk to beta.61
MattDHill Mar 17, 2026
2d7ad7f
Update dependency version ranges
MattDHill Mar 17, 2026
7fd848d
Update start-sdk to beta.62
MattDHill Mar 20, 2026
1a57bf8
Bump version to 0.16.1-alpha:1-beta.2
MattDHill Mar 20, 2026
efe6892
Update start-sdk to beta.65
MattDHill Mar 23, 2026
cab40e5
bump minimum dependency versions to latest
MattDHill Mar 23, 2026
02127c5
sdk beta.66 + version bump
MattDHill Mar 25, 2026
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
37 changes: 11 additions & 26 deletions .github/workflows/buildService.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,18 @@ on:
workflow_dispatch:
pull_request:
paths-ignore: ['*.md']
branches: ['main', 'master']
branches: ['master']
push:
paths-ignore: ['*.md']
branches: ['main', 'master']
branches: ['master']

jobs:
BuildPackage:
runs-on: ubuntu-latest
steps:
- name: Prepare StartOS SDK
uses: Start9Labs/sdk@v1

- name: Checkout services repository
uses: actions/checkout@v3
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true

- name: Build the service package
id: build
run: |
git submodule update --init --recursive
start-sdk init
make
PACKAGE_ID=$(yq -oy ".id" manifest.*)
echo "::set-output name=package_id::$PACKAGE_ID"
shell: bash

- name: Upload .s9pk
uses: actions/upload-artifact@v3
with:
name: ${{ steps.build.outputs.package_id }}.s9pk
path: ./${{ steps.build.outputs.package_id }}.s9pk
jobs:
build:
if: github.event.pull_request.draft == false
uses: start9labs/shared-workflows/.github/workflows/buildService.yml@master
secrets:
DEV_KEY: ${{ secrets.DEV_KEY }}
70 changes: 9 additions & 61 deletions .github/workflows/releaseService.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,14 @@ on:
- 'v*.*'

jobs:
ReleasePackage:
runs-on: ubuntu-latest
release:
uses: start9labs/shared-workflows/.github/workflows/releaseService.yml@master
with:
REGISTRY: ${{ vars.REGISTRY }}
S3_S9PKS_BASE_URL: ${{ vars.S3_S9PKS_BASE_URL }}
secrets:
DEV_KEY: ${{ secrets.DEV_KEY }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
permissions:
contents: write
steps:
- name: Prepare StartOS SDK
uses: Start9Labs/sdk@v1

- name: Checkout services repository
uses: actions/checkout@v3

- name: Build the service package
run: |
git submodule update --init --recursive
start-sdk init
make

- name: Setting package ID and title from the manifest
id: package
run: |
echo "::set-output name=package_id::$(yq -oy ".id" manifest.*)"
echo "::set-output name=package_title::$(yq -oy ".title" manifest.*)"
shell: bash

- name: Generate sha256 checksum
run: |
PACKAGE_ID=${{ steps.package.outputs.package_id }}
sha256sum ${PACKAGE_ID}.s9pk > ${PACKAGE_ID}.s9pk.sha256
shell: bash

- name: Generate changelog
run: |
PACKAGE_ID=${{ steps.package.outputs.package_id }}
echo "## What's Changed" > change-log.txt
yq e '.release-notes' manifest.yaml >> change-log.txt
echo "## SHA256 Hash" >> change-log.txt
echo '```' >> change-log.txt
sha256sum ${PACKAGE_ID}.s9pk >> change-log.txt
echo '```' >> change-log.txt
shell: bash

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
name: ${{ steps.package.outputs.package_title }} ${{ github.ref_name }}
prerelease: true
body_path: change-log.txt
files: |
./${{ steps.package.outputs.package_id }}.s9pk
./${{ steps.package.outputs.package_id }}.s9pk.sha256

- name: Publish to Registry
env:
S9USER: ${{ secrets.S9USER }}
S9PASS: ${{ secrets.S9PASS }}
S9REGISTRY: ${{ secrets.S9REGISTRY }}
run: |
if [[ -z "$S9USER" || -z "$S9PASS" || -z "$S9REGISTRY" ]]; then
echo "Publish skipped: missing registry credentials."
else
start-sdk publish https://$S9USER:$S9PASS@$S9REGISTRY ${{ steps.package.outputs.package_id }}.s9pk
fi
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
lightning-terminal.s9pk
image.tar
*.s9pk
startos/*.js
node_modules/
.DS_Store
.vscode/
docker-images/
docker-images
javascript
ncc-cache
1 change: 0 additions & 1 deletion .gitmodules

This file was deleted.

2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## How the upstream version is pulled
- dockerTag in `startos/manifest/index.ts`: `lightninglabs/lightning-terminal:v<version>`
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Contributing

## Building and Development

See the [StartOS Packaging Guide](https://docs.start9.com/packaging/) for complete environment setup and build instructions.

### Quick Start

```bash
# Install dependencies
npm ci

# Build universal package
make
```
11 changes: 0 additions & 11 deletions Dockerfile

This file was deleted.

37 changes: 3 additions & 34 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,34 +1,3 @@
PKG_ID := $(shell yq e ".id" manifest.yaml)
PKG_VERSION := $(shell yq e ".version" manifest.yaml)
TS_FILES := $(shell find ./ -name \*.ts)

# delete the target of a rule if it has changed and its recipe exits with a nonzero exit status
.DELETE_ON_ERROR:

all: verify

verify: $(PKG_ID).s9pk
start-sdk verify s9pk $(PKG_ID).s9pk

install: $(PKG_ID).s9pk
start-cli package install $(PKG_ID).s9pk

clean:
rm -rf docker-images
rm -f image.tar
rm -f $(PKG_ID).s9pk
rm -f scripts/*.js

scripts/embassy.js: $(TS_FILES)
deno bundle scripts/embassy.ts scripts/embassy.js

docker-images/x86_64.tar: Dockerfile docker_entrypoint.sh
mkdir -p docker-images
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/amd64 --build-arg PLATFORM=amd64 -o type=docker,dest=docker-images/x86_64.tar .

docker-images/aarch64.tar: Dockerfile docker_entrypoint.sh
mkdir -p docker-images
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/arm64 --build-arg PLATFORM=arm64 -o type=docker,dest=docker-images/aarch64.tar .

$(PKG_ID).s9pk: manifest.yaml instructions.md LICENSE icon.png scripts/embassy.js docker-images/aarch64.tar docker-images/x86_64.tar
start-sdk pack
ARCHES := x86 arm
# overrides to s9pk.mk must precede the include statement
include s9pk.mk
169 changes: 132 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,57 +1,152 @@
# Wrapper for Lightning Terminal
<p align="center">
<img src="icon.svg" alt="Lightning Terminal Logo" width="21%">
</p>

`Lightning Terminal (LiT)` is a browser-based interface for managing channel liquidity. This .s9pk wrapper will allow you to run LiT on your Start9 Server.
# Lightning Terminal on StartOS

## StartOS Service Pre-Requisites:
> **Upstream docs:** <https://docs.lightning.engineering/lightning-network-tools/lightning-terminal>
>
> Everything not listed in this document should behave the same as upstream
> Lightning Terminal. If a feature, setting, or behavior is not mentioned here, the
> upstream documentation is accurate and fully applicable.

- [lnd](https://github.com/Start9Labs/lnd-wrapper)
A browser-based interface for managing channel liquidity on a self-hosted LND node. See the [upstream repo](https://github.com/lightninglabs/lightning-terminal) for general Lightning Terminal documentation.

## Dependencies
---

- [docker](https://docs.docker.com/get-docker)
- [docker-buildx](https://docs.docker.com/buildx/working-with-buildx/)
- [yq](https://mikefarah.gitbook.io/yq)
- [toml](https://crates.io/crates/toml-cli)
- [start-sdk](https://github.com/Start9Labs/start-os/tree/master/backend)
- [make](https://www.gnu.org/software/make/)
## Table of Contents

## Build enviroment
- [Image and Container Runtime](#image-and-container-runtime)
- [Volume and Data Layout](#volume-and-data-layout)
- [Installation and First-Run Flow](#installation-and-first-run-flow)
- [Configuration Management](#configuration-management)
- [Network Access and Interfaces](#network-access-and-interfaces)
- [Actions](#actions-startos-ui)
- [Backups and Restore](#backups-and-restore)
- [Health Checks](#health-checks)
- [Dependencies](#dependencies)
- [Limitations and Differences](#limitations-and-differences)
- [What Is Unchanged from Upstream](#what-is-unchanged-from-upstream)
- [Contributing](#contributing)
- [Quick Reference for AI Consumers](#quick-reference-for-ai-consumers)

Before building the lightning terminal package, your build environment must be setup for building StartOS services. Instructions for setting up the proper build environment can be found in the [Developer Docs](https://docs.start9.com/latest/developer-docs/packaging).
---

## Image and Container Runtime

## Cloning
| Property | Value |
|----------|-------|
| Image | `lightninglabs/lightning-terminal` (upstream, unmodified) |
| Architectures | x86_64, aarch64 |
| Entrypoint | `/bin/litd` |

Clone the project locally. Note the submodule link to the original project(s).
## Volume and Data Layout

```
git clone https://github.com/Start9Labs/lightning-terminal-wrapper.git
cd lightning-terminal-wrapper
git submodule update --init --recursive
```
| Volume | Mount Point | Purpose |
|--------|-------------|---------|
| `main` | `/root` | All LiT data (configuration, application state) |

## Building
StartOS-specific files on the `main` volume:

To build the project, run the following commands:
| File | Purpose |
|------|---------|
| `.lit/lit.conf` | LiT configuration (managed by StartOS) |

```
make
```
The LND `main` volume is mounted read-only at `/mnt/lnd` for macaroon and TLS certificate access.

## Installing (on StartOS)
## Installation and First-Run Flow

Run the following commands to determine successful install:
> :information_source: Change server-name.local to your Start9 server address
1. On install, StartOS creates a **critical task** prompting the user to set an admin password via the **Create Password** action
2. The `.lit/lit.conf` file is written with default configuration and the generated password
3. LiT connects to the running LND node using the mounted macaroon and TLS certificate

```
start-cli auth login
#Enter your StartOS password
start-cli --host https://server-name.local package install lightning-terminal.s9pk
```
**Tip:** You can also install the lightning-terminal.s9pk using **Sideload Service** under the **System > Manage** section.
## Configuration Management

LiT is configured via the `.lit/lit.conf` file, managed by StartOS. There are no user-configurable settings exposed through StartOS actions — the admin password is the only managed value.

Settings managed by StartOS (hardcoded):

| Setting | Value | Reason |
|---------|-------|--------|
| `uipassword` | Auto-generated | Set via Create/Reset Password action |
| `lit-dir` | `/root` | Maps to the mounted volume |
| `insecure-httplisten` | `lightning-terminal.startos:8443` | StartOS service networking |
| `remote.lnd.rpcserver` | `lnd.startos:10009` | StartOS service networking |
| `remote.lnd.macaroonpath` | `/mnt/lnd/data/chain/bitcoin/mainnet/admin.macaroon` | Mounted dependency volume |
| `remote.lnd.tlscertpath` | `/mnt/lnd/tls.cert` | Mounted dependency volume |

## Network Access and Interfaces

| Interface | Port | Protocol | Purpose |
|-----------|------|----------|---------|
| Web UI | 8443 | HTTP | Lightning Terminal web interface |

## Actions (StartOS UI)

| Action | Purpose | Availability | Inputs |
|--------|---------|-------------|--------|
| **Create/Reset Password** | Generate a random 22-character admin password for the web UI | Any | None |

The action name changes dynamically: "Create Password" on first use, "Reset Password" thereafter. The generated password is displayed once as a copyable value.

## Backups and Restore

## Verify Install
**Backed up:** The entire `main` volume (configuration, application data).

Go to your StartOS Services page, select lightning-terminal and start the service.
**Restore behavior:** Standard restore — the configuration and data are restored as-is. The configured LND node must be available.

**Done!**
## Health Checks

| Check | Method | Messages |
|-------|--------|----------|
| **Web Interface** | Port listening (8443) | Ready: "The web interface is ready" |

## Dependencies

| Dependency | Required | Purpose |
|------------|----------|---------|
| LND | Required | Lightning Network node access via gRPC |

LND must be installed and running. LiT connects to LND using the admin macaroon and TLS certificate from the mounted volume.

## Limitations and Differences

1. **Remote mode only** — LiT runs in remote mode connecting to a separate LND instance; integrated mode (where LiT runs its own LND) is not available
2. **No user-configurable settings** — all configuration is managed by StartOS; the only user action is password management
3. **Password-only authentication** — the UI password is auto-generated via the StartOS action; there is no option to set a custom password manually

## What Is Unchanged from Upstream

- Lightning Loop (submarine swaps — Loop In and Loop Out)
- Lightning Pool (channel liquidity marketplace)
- Channel visualization and balance management
- All web UI functionality
- Faraday (channel analytics)

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for build instructions and development workflow.

---

## Quick Reference for AI Consumers

```yaml
package_id: lightning-terminal
image: lightninglabs/lightning-terminal
architectures: [x86_64, aarch64]
volumes:
main: /root
ports:
ui: 8443
dependencies:
- lnd (required)
startos_managed_files:
- .lit/lit.conf
actions:
- reset-password
health_checks:
- port_listening: 8443
backup_volumes:
- main
```
1 change: 1 addition & 0 deletions assets/ABOUT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use the `/assets` directory to include additional files or scripts needed by your service.
Loading