Skip to content

Commit

Permalink
That’s quite a bit to pack into one commit! 😉
Browse files Browse the repository at this point in the history
  • Loading branch information
k0gen committed Aug 30, 2024
1 parent 6906c6a commit 5100720
Show file tree
Hide file tree
Showing 12 changed files with 46 additions and 47 deletions.
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
FROM ghcr.io/getalby/hub:v1.4.1
LABEL maintainer="andrewlunde <[email protected]>"
FROM ghcr.io/getalby/hub:v1.6.0 AS builder

FROM debian:12-slim AS final

# Start9 Packaging
RUN apk add --no-cache yq; \
rm -f /var/cache/apk/*
ENV LD_LIBRARY_PATH=/usr/lib/nwc

COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /usr/lib/nwc/libbreez_sdk_bindings.so /usr/lib/nwc/
COPY --from=builder /usr/lib/nwc/libglalby_bindings.so /usr/lib/nwc/
COPY --from=builder /usr/lib/nwc/libldk_node.so /usr/lib/nwc/
COPY --from=builder /bin/main /bin/
COPY --chmod=755 docker_entrypoint.sh /usr/local/bin/

LABEL maintainer="andrewlunde <[email protected]>"
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ else
docker buildx build --tag start9/$(PKG_ID)/main:$(PKG_VERSION) --platform=linux/amd64 -o type=docker,dest=docker-images/x86_64.tar .
endif

$(PKG_ID).s9pk: manifest.yaml instructions.md nwc-logo.png LICENSE scripts/embassy.js docker-images/aarch64.tar docker-images/x86_64.tar
$(PKG_ID).s9pk: manifest.yaml instructions.md icon.png LICENSE scripts/embassy.js docker-images/aarch64.tar docker-images/x86_64.tar
ifeq ($(ARCH),aarch64)
@echo "start-sdk: Preparing aarch64 package ..."
else ifeq ($(ARCH),x86_64)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<p align="center">
<img src="nwc-logo.png" alt="Project Logo" width="21%">
<img src="icon.png" alt="Project Logo" width="21%">
</p>

# Alby Hub for StartOS

[Alby Hub](https://github.com/getAlby/hub) is the open-source, self-custodial Lightning wallet that puts you in control. With an integrated node, it's more than just a wallet—it's your gateway to Bitcoin. Manage channels, run apps, and take charge of your funds, all through one sleek, user-friendly interface. Empower your Bitcoin journey with simplicity and sovereignty.
This repository creates the `s9pk` package that is installed to run `Alby Hub` on [StartOS](https://github.com/Start9Labs/start-os/).

## Dependencies
Expand Down
10 changes: 3 additions & 7 deletions docker_entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/bin/sh

# https://nwc.getalby.com/public/images/nwc-logo.svg

#
export LN_BACKEND_TYPE="LND"
export LND_ADDRESS="lnd.embassy:10009" #the LND gRPC address, eg. localhost:10009 (used with the LND backend)
export LND_CERT_FILE="/mnt/lnd/tls.cert" #the location where LND's tls.cert file can be found (used with the LND backend)
Expand All @@ -11,13 +8,12 @@ export WORK_DIR="/data/albyhub"
export PORT=8080 #the port on which the app should listen on (default='blah' #8080)
export LOG_EVENTS=true # makes debugging easier

export TOR_ADDRESS=$(yq e '.tor-address' /data/start9/config.yaml)
export LAN_ADDRESS=$(yq e '.lan-address' /data/start9/config.yaml)

# export TOR_ADDRESS=$(yq e '.tor-address' /data/start9/config.yaml)
# export LAN_ADDRESS=$(yq e '.lan-address' /data/start9/config.yaml)
printf "\n\n [i] Starting Alby Hub ...\n\n"
echo "LN Backend Type: " $LN_BACKEND_TYPE
echo "LN Address: " $LND_ADDRESS
echo "LND Cert: " $LND_CERT_FILE
echo "LND Macaroon: " $LND_MACAROON_FILE

# exec /bin/bash
exec /bin/main
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions instructions.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
## Creating a new connection
# Quick Start Guide for Alby Hub

1. Click `Launch UI` to launch Alby Hub and manage app connections.
2. Click `Connections` and `Add Connection` or choose an app from the `App Store`.
3. Name the connection after the client app that will be using it. For example, if you plan to connect your private noStrudel client, you should name this connection `noStrudel`.
4. Optionally adjust the permissions, monthly budget, and expiration of the connection.
5. Click `Next` to save the connection.
6. Use the generated connection secret to connect your client app. You can delete the connection at any time to revoke access.
1. **Launch Alby Hub**
Click the `Launch UI` button to start Alby Hub.

## Connecting your client app
2. **Get Started**
On the Alby Welcome screen, click **Get Started (LND)**.

1. In your Nostr client app, find the setting for connecting your lightning node and select `Nostr Wallet Connect`. For noStrudel, this is in Settings -> Lightning.
2. Provide the connection secret generated from the instructions above either by scanning the QR code or copy/pasting the secret.
3. Done. You can now zapp and boost using your own lightning node.
3. **Create a Strong Password**
Set a strong password for your Alby Hub account. It’s recommended to store this password securely in your self-hosted Vaultwarden.

4. **Connect Your Alby Account**
Follow the on-screen instructions to connect your Alby account.

5. **All Set!**
You’re done! Your Alby Hub is now ready to use.

## Getting Help

For more information and help about Alby visit [getalby.com](https://getalby.com)

For more information about NWC, see the [Alby Nostr Wallet Connect](https://nwc.dev/).

You can also ask for assistance in the [Start9 community chats](https://start9.com/contact).
28 changes: 14 additions & 14 deletions manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id: albyhub
title: Alby Hub
version: 1.4.1
version: 1.6.0
release-notes: Alby Hub initial release
license: Apache-2.0
wrapper-repo: "https://github.com/horologger/albyhub-startos"
Expand All @@ -9,12 +9,12 @@ support-site: "https://github.com/getAlby/hub/issues"
marketing-site: "https://getalby.com/"
build: ["make"]
description:
short: Alby Hub for Start9
short: Self-custodial Lightning wallet with integrated node.
long: |
Connect your Start9 to the world of Bitcoin apps.
Alby Hub is the open-source, self-custodial Lightning wallet that puts you in control. With an integrated node, it's more than just a wallet—it's your gateway to Bitcoin. Manage channels, run apps, and take charge of your funds, all through one sleek, user-friendly interface. Empower your Bitcoin journey with simplicity and sovereignty.
assets:
license: LICENSE
icon: nwc-logo.png
icon: icon.png
instructions: instructions.md
main:
type: docker
Expand All @@ -29,11 +29,11 @@ health-checks:
name: Web UI
success-message: Alby Hub is ready
type: script
config:
get:
type: script
set:
type: script
config: ~
# get:
# type: script
# set:
# type: script
properties: ~
environment: ~
volumes:
Expand Down Expand Up @@ -62,7 +62,7 @@ interfaces:
- http
dependencies:
lnd:
version: ">=0.16.0 <0.19.0"
version: ">=0.16.0 <0.20.0"
description: Nostr Wallet Connect works with your LND
requirement:
type: "required"
Expand All @@ -78,10 +78,10 @@ backup:
- duplicity
- create
- /mnt/backup
- /root/data
- /data/albyhub
mounts:
BACKUP: "/mnt/backup"
main: "/root/data"
main: "/data/albyhub"
restore:
type: docker
image: compat
Expand All @@ -91,10 +91,10 @@ backup:
- duplicity
- restore
- /mnt/backup
- /root/data
- /data/albyhub
mounts:
BACKUP: "/mnt/backup"
main: "/root/data"
main: "/data/albyhub"
migrations:
from:
"*":
Expand Down
Binary file removed nwc-logo.png
Binary file not shown.
1 change: 0 additions & 1 deletion nwc-logo.svg

This file was deleted.

4 changes: 0 additions & 4 deletions scripts/procedures/getConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

import { compat, types as T } from "../deps.ts";

// export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({});

// https://docs.start9.com/0.3.5.x/developer-docs/specification/config-spec#string

export const getConfig: T.ExpectedExports.getConfig = compat.getConfig({
"tor-address": {
"name": "Tor Address",
Expand Down
2 changes: 1 addition & 1 deletion scripts/procedures/migrations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { compat, types as T } from "../deps.ts";

export const migration: T.ExpectedExports.migration = compat.migrations
.fromMapping({}, "0.4.2.1" );
.fromMapping({}, "1.6.0" );

0 comments on commit 5100720

Please sign in to comment.