Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
75 changes: 75 additions & 0 deletions .github/docs/Docker-Setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
## Docker Setup Guide

### Application Configuration

Create a configuration file that will be mounted into the container. This persists your settings between runs.

**File:** `config.json`
```bash
mkdir -p /tmp/docker/ && cat > /tmp/docker/config.json << 'EOF'
{
"unit": "SATS",
"fiatUnit": "USD",
"appMode": "DARK",
"singleSignOn": false,
"password": ""
}
EOF
```

### Replace the Entrypoint Script

The default entrypoint expects a local `lightning-rpc` socket. It can be replaced with simpler version below if we can not provide access to `lightning-rpc`.

**File:** `entrypoint.sh`
```bash
cat > /tmp/docker/entrypoint.sh << 'EOF'
#!/bin/sh
echo "Replaced default entrypoint"
exec "$@"
EOF

chmod +x /tmp/docker/entrypoint.sh
```

### Core Lightning Authentication (Commando)

Create a file to store the credentials for authenticating with remote Core Lightning node.

**File:** `.commando`
```bash
cat > /tmp/docker/.commando << 'EOF'
LIGHTNING_PUBKEY="<YOUR_NODE_PUBKEY>"
LIGHTNING_RUNE="<YOUR_RUNE>"
EOF
```

### 4. Run the Docker Container

The following command starts the `cln-application` container, configured to connect to remote core lightning node "cln-node" via its exposed WebSocket port 5018.

```bash
docker run -d \
--name cln-app \
--network application-net \
-v '/tmp/docker/config.json:/app/config.json' \
-v '/tmp/docker/.commando:/app/.commando' \
-v '/tmp/docker/entrypoint.sh:/app/entrypoint.sh' \
-p 2103:2103 \
-e APP_SINGLE_SIGN_ON=false \
-e BITCOIN_NETWORK="regtest" \
-e APP_CONFIG_FILE="/app/config.json" \
-e APP_CONNECT="COMMANDO" \
-e APP_PROTOCOL="http" \
-e APP_HOST="0.0.0.0" \
-e APP_PORT=2103 \
-e LIGHTNING_HOST="cln-node" \
-e LIGHTNING_VARS_FILE="/app/.commando" \
-e LIGHTNING_WS_PROTOCOL="ws" \
-e LIGHTNING_WS_PORT=5018 \
ghcr.io/elementsproject/cln-application:25.07.2 npm run start
```

### Access the Application

Once the container is running, open your web browser and navigate to: **http://localhost:2103**
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@
```
npm run start
```
- ## Docker
- For a minimal Docker setup to run the application with a remote Core Lightning node, see our [Docker Setup Guide](./.github/docs/Docker-Setup.md).

- ## Stores/Marketplaces
- This application is also available on Umbrel App Store and Start9 OS with one click install.
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cln-application-backend",
"version": "25.07.2",
"version": "25.07.3",
"description": "Core lightning application backend",
"private": true,
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion apps/backend/source/controllers/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class SharedController {
try {
logger.info('Getting Application Settings from ' + APP_CONSTANTS.APP_CONFIG_FILE);
if (!fs.existsSync(APP_CONSTANTS.APP_CONFIG_FILE)) {
logger.warning(
logger.warn(
`Config file ${APP_CONSTANTS.APP_CONFIG_FILE} not found. Creating default config.`,
);
fs.writeFileSync(
Expand Down
4 changes: 2 additions & 2 deletions apps/backend/source/shared/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export function verifyPassword(password: string) {
return error;
}
} else {
return 'Config file does not exist';
return 'Config file does not exist to verify the password';
}
}

Expand All @@ -68,7 +68,7 @@ export function isValidPassword() {
return error;
}
} else {
return 'Config file does not exist';
return 'Config file does not exist to validate the password';
}
}

Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cln-application-frontend",
"version": "25.07.2",
"version": "25.07.3",
"description": "Core lightning application frontend",
"private": true,
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions apps/frontend/src/components/ui/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const Header = (props) => {
<div className="d-flex align-items-center">
<Menu compact={true} />
<Settings compact={true} onShowConnectWallet={props.onShowConnectWallet} />
{serverConfig.singleSignOn === true ?
{serverConfig.singleSignOn === true || serverConfig.singleSignOn === "true" ?
<span className='mx-3'></span>
:
<div onClick={logoutHandler}>
Expand Down Expand Up @@ -131,7 +131,7 @@ const Header = (props) => {
<div className='d-flex align-items-center'>
<Menu />
<Settings onShowConnectWallet={props.onShowConnectWallet} />
{serverConfig.singleSignOn === true ?
{serverConfig.singleSignOn === true || serverConfig.singleSignOn === "true" ?
<span className='mx-3'></span>
:
<div onClick={logoutHandler}>
Expand Down Expand Up @@ -193,7 +193,7 @@ const Header = (props) => {
<div className="d-flex align-items-center">
<Menu />
<Settings onShowConnectWallet={props.onShowConnectWallet} />
{serverConfig.singleSignOn === true ?
{serverConfig.singleSignOn === true || serverConfig.singleSignOn === "true" ?
<span className='mx-3'></span>
:
<div onClick={logoutHandler}>
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/components/ui/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Settings = (props) => {
<Dropdown.Item data-bs-toggle='modal' data-bs-target='#staticBackdrop' onClick={() => dispatch(setShowModals({...showModals, nodeInfoModal: true}))}>Show node ID</Dropdown.Item>
<Dropdown.Item data-bs-toggle='modal' data-bs-target='#staticBackdrop' onClick={() => dispatch(setShowModals({ ...showModals, connectWalletModal: true }))}>Connect wallet</Dropdown.Item>
<Dropdown.Item data-bs-toggle='modal' data-bs-target='#staticBackdrop' onClick={() => dispatch(setShowModals({ ...showModals, sqlTerminalModal: true }))}>SQL Terminal</Dropdown.Item>
{ serverConfig.singleSignOn === true ?
{ serverConfig.singleSignOn === true || serverConfig.singleSignOn === "true" ?
<></>
:
<Dropdown.Item data-bs-toggle='modal' data-bs-target='#staticBackdrop' onClick={() => dispatch(setShowModals({ ...showModals, setPasswordModal: true }))}>Reset Password</Dropdown.Item>
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/types/root.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export type ApplicationConfiguration = {
appPort?: string;
appProtocol?: string;
appVersion?: string;
singleSignOn?: boolean;
singleSignOn?: boolean | string;
}
error?: any;
};
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/utilities/test-utilities/mockData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ export const mockFeeRate = {

export const mockCLNStoreData = {
listInvoices: mockListInvoices,
listPayments: mockListInvoices,
listPayments: mockListPayments,
listOffers: mockListOffers,
listLightningTransactions: mockListLightningTransactions,
listBitcoinTransactions: mockListBitcoinTransactions,
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cln-application",
"version": "25.07.2",
"version": "25.07.3",
"description": "Core lightning application",
"private": true,
"license": "MIT",
Expand Down