Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Work this package's `TODO.md` from top to bottom. Keep `README.md` (architecture

## This repo

- **Package id is `bisq`.** Bisq Desktop is a GUI application, served to the browser over a LinuxServer.io KasmVNC base image (`/init` s6 entrypoint). A single `primary` daemon runs it; the only interface is the `ui` web view (host `ui-multi`). Depends on `bitcoind` (Bitcoin full node) for blockchain data.
- **Package id is `bisq`.** Bisq Desktop is a GUI application, served to the browser over a LinuxServer.io Selkies base image (`/init` s6 entrypoint). A single `primary` daemon runs it; the only interface is the `ui` web view (host `ui-multi`). Depends on `bitcoind` (Bitcoin full node) for blockchain data.

## Inspecting a running install

To run a command inside the service's container (read its generated config, grep app logs), use `start-cli package attach bisq -n bisq-sub -- <cmd>`. Select the subcontainer by **name** with `-n` (the name passed to `SubContainer.of` in `main.ts` — here `bisq-sub`) or by image with `-i`. Note: `-s/--subcontainer` matches the internal **Guid**, not the name, so passing a name to `-s` fails with "no matching subcontainers".
To run a command inside the service's container (read its generated config, grep app logs), use `start-cli package attach bisq -n bisq-sub -- <cmd>`. Select the subcontainer by **name** with `-n` (the name passed to `SubContainer.eager` in `main.ts` — here `bisq-sub`) or by image with `-i`. Note: `-s/--subcontainer` matches the internal **Guid**, not the name, so passing a name to `-s` fails with "no matching subcontainers".
29 changes: 16 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Stage 1: Install Bisq in Ubuntu where the .deb works
FROM ubuntu:jammy AS bisq-builder

ARG BISQ_VERSION=1.10.3
ARG BISQ_VERSION=1.10.4
ARG BISQ_PGP_KEY=B493319106CC3D1F252E19CBF806F422E222AA02

RUN apt-get update && \
Expand All @@ -20,8 +20,8 @@ RUN wget -qO /tmp/Bisq-64bit-${BISQ_VERSION}.deb \
test -d /opt/bisq && \
rm -f /tmp/Bisq-64bit-${BISQ_VERSION}.deb*

# Stage 2: Webtop with bloat removed
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm AS buildstage
# Stage 2: Selkies webtop with bloat removed
FROM ghcr.io/linuxserver/baseimage-selkies:debiantrixie@sha256:a5f7b38bb806c913bdabbe5667aa462d97d2c5ab3710498fe5aeee97c17287f8 AS buildstage

# Install GTK3, X11 libraries for JavaFX, and wmctrl
RUN apt-get update && \
Expand All @@ -43,13 +43,14 @@ RUN apt-get update && \
libfreetype6 \
libfontconfig1 \
libasound2 \
fonts-dejavu-core \
x11-xserver-utils \
xcvt \
wmctrl && \
# Remove large unused packages from base image
DEBIAN_FRONTEND=noninteractive \
apt-get remove --purge --autoremove -y \
containerd.io \
cpp \
cpp-12 \
docker-ce \
docker-ce-cli \
docker-buildx-plugin \
Expand All @@ -69,14 +70,10 @@ RUN apt-get update && \
COPY --from=bisq-builder /opt/bisq /opt/bisq
RUN ln -s /opt/bisq/bin/Bisq /usr/local/bin/bisq

# Branding, window config — maximize ALL windows, no decorations
# Branding
RUN echo "Bisq for StartOS is loading ..." > \
/etc/s6-overlay/s6-rc.d/init-adduser/branding && \
sed -i '/run_branding() {/,/}/d' /docker-mods && \
sed -i 's|</applications>| <application type="normal">\n <maximized>yes</maximized>\n <decor>no</decor>\n </application>\n</applications>|' \
/etc/xdg/openbox/rc.xml && \
rm -f /etc/cont-init.d/99-deprecation 2>/dev/null || true && \
rm -f /kasmbins/kasm_webcam_server 2>/dev/null || true
sed -i '/^run_branding() {$/,/^}$/c\run_branding() { :; }' /docker-mods

# Stage 3: Flatten into a single layer from scratch
FROM scratch
Expand All @@ -93,17 +90,23 @@ ENV \
S6_VERBOSITY=1 \
S6_STAGE2_HOOK=/docker-mods \
VIRTUAL_ENV=/lsiopy \
PATH="/lsiopy/bin:$PATH" \
PATH="/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
DISPLAY=:1 \
PERL5LIB=/usr/local/bin \
OMP_WAIT_POLICY=PASSIVE \
GOMP_SPINCOUNT=0 \
START_DOCKER=false \
PULSE_RUNTIME_PATH=/defaults \
NVIDIA_DRIVER_CAPABILITIES=all
SELKIES_INTERPOSER=/usr/lib/selkies_joystick_interposer.so \
NVIDIA_DRIVER_CAPABILITIES=all \
DISABLE_ZINK=false \
DISABLE_DRI3=false \
SELKIES_ENCODER="x264enc,jpeg" \
TITLE=Selkies

# Add local files
COPY root/ /
RUN chmod 755 /defaults/startwm.sh /defaults/autostart

EXPOSE 3000
VOLUME /config
Expand Down
61 changes: 35 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@

## Image and Container Runtime

| Property | Value |
| ------------- | ------------------------------------------------------------------------------------------------------------------- |
| Image source | Custom multi-stage Dockerfile (Ubuntu Jammy builder + KasmVNC Debian Bookworm webtop, flattened via `FROM scratch`) |
| Architectures | x86_64 only |
| Entrypoint | `/init` launched via SDK `runAsInit: true` so the container gets PID 1 for s6-overlay |
| Property | Value |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| Image source | Custom multi-stage Dockerfile (Ubuntu Jammy builder + pinned LinuxServer Selkies Debian Trixie webtop, flattened via `FROM scratch`) |
| Architectures | x86_64 only |
| Entrypoint | Upstream `/init` launched via SDK `useEntrypoint()` and `runAsInit: true` so the container gets PID 1 for s6-overlay |

Bisq is a JavaFX desktop application with no web interface. This package runs it inside a browser-accessible Linux desktop (webtop) powered by KasmVNC:
Bisq is a JavaFX desktop application with no web interface. This package runs it inside a browser-accessible Linux desktop (webtop) streamed by Selkies:

```
Browser -> KasmVNC (port 3000) -> Openbox -> Bisq (JavaFX)
Browser -> Selkies (port 3000) -> Openbox -> Bisq (JavaFX)
```

## Volume and Data Layout
Expand All @@ -51,46 +51,52 @@ Browser -> KasmVNC (port 3000) -> Openbox -> Bisq (JavaFX)
| ------ | ----------- | ------------------------------------------------ |
| `main` | `/config` | Webtop home, Bisq application data, `store.json` |

- **`store.json`** — StartOS-managed file storing the admin password (username is hardcoded to `bisq`)
- **`store.json`** — StartOS-managed file storing the desktop password (username is hardcoded to `bisq`)
- **`/config/.local/share/Bisq/`** — upstream Bisq data directory (wallet, trades, settings)
- **`/config/.local/share/Bisq/bisq.properties`** — generated at launch by `startwm.sh`

## Installation and First-Run Flow

1. On install, `store.json` is seeded empty (no password set) and the username `bisq` is hardcoded in the service.
2. A **critical task** prompts the user to run the **Set Admin Password** action, which generates a random password and displays the credentials.
3. The password is passed to KasmVNC via the `PASSWORD` environment variable.
3. The credentials are passed to Selkies via the `CUSTOM_USER` and `PASSWORD` environment variables.

Bisq launches directly into the desktop. Any upstream wallet/setup prompts run
inside the Bisq UI after the desktop opens.

## Configuration Management

| StartOS-Managed | Upstream-Managed |
| ------------------------------------- | -------------------------------------------- |
| Admin username and password | All Bisq application settings via its own UI |
| KasmVNC webtop settings (port, auth) | Wallet, trades, offers |
| `bisq.properties` (Tor/network flags) | |
| StartOS-Managed | Upstream-Managed |
| ------------------------------------ | -------------------------------------------- |
| Admin username and password | All Bisq application settings via its own UI |
| Selkies webtop settings (port, auth) | Wallet, trades, offers |
| `bisq.properties` (Tor/Bitcoin node) | |

The `bisq.properties` file is regenerated on every launch by `startwm.sh` with:

- `useTorForBtc=false` (StartOS handles Tor at the network level)
- `btcNodes=` (empty — let Bisq discover peers)
- `btcNodes=<bridge address>` (Bitcoin Core's private, whitelisted `peer-local` listener)
- Empty banned node lists (`bannedSeedNodes`, `bannedBtcNodes`, `bannedPriceRelayNodes`)

`startos/main.ts` resolves the live bridge address from Bitcoin Core's
`peer-local` binding and passes it into the container. The address is watched
reactively: Bisq restarts only if that binding appears, disappears, or changes,
not when Bitcoin Core receives a routine update. If the dependency is absent,
the `btcNodes` property is omitted until the binding becomes available.

## Network Access and Interfaces

| Interface | Port | Protocol | Purpose |
| ------------ | ---- | -------- | ---------------------------------------------------- |
| Bisq Desktop | 3000 | HTTP | KasmVNC web interface (full Bisq desktop in browser) |
| Bisq Desktop | 3000 | HTTP | Selkies web interface (full Bisq desktop in browser) |

Access via LAN (.local), Tor (.onion), or any other address type configured in StartOS. StartOS terminates TLS, so the interface is always available over HTTPS to the user.

## Actions (StartOS UI)

| Action | Purpose | Availability | Inputs | Outputs |
| ---------------------- | ------------------------------------------------------- | ------------ | ------ | ------------------------- |
| **Set Admin Password** | Generate a new random password for the webtop interface | Any status | None | Username and new password |
| Action | Purpose | Availability | Inputs | Outputs |
| ---------------------- | -------------------------------------------------------- | ------------ | ------ | ------------------------- |
| **Set Admin Password** | Generate a new random password for the Selkies interface | Any status | None | Username and new password |

On first install, this action is triggered automatically as a critical task.

Expand All @@ -107,17 +113,18 @@ On first install, this action is triggered automatically as a critical task.

## Dependencies

| Dependency | Required | Health check | Purpose |
| -------------------- | -------- | ------------ | --------------- |
| Bitcoin (`bitcoind`) | Yes | `bitcoind` | Blockchain data |
| Dependency | Required | Health check | Purpose |
| -------------------- | -------- | ------------ | ---------------------------------------------------- |
| Bitcoin (`bitcoind`) | Yes | `bitcoind` | Private, trusted peer connection for blockchain data |

## Limitations and Differences

1. **x86_64 only** — Bisq does not provide official ARM builds.
2. **No direct desktop access** — Bisq runs inside a KasmVNC webtop, not as a native desktop app.
2. **No direct desktop access** — Bisq runs inside a Selkies webtop, not as a native desktop app.
3. **`bisq.properties` is overwritten on every start** — manual edits to this file will not persist.
4. **Tor for BTC is disabled** — StartOS manages Tor at the network layer; Bisq's built-in Tor is bypassed.
5. **First launch is slow** — Bisq needs to connect to the P2P trading network and sync, which can take several minutes.
4. **Bitcoin traffic uses the local full node** — Bisq connects to Bitcoin Core's bridge-only, whitelisted peer listener instead of discovering public Bitcoin peers.
5. **Tor for BTC is disabled** — StartOS manages Tor at the network layer; Bisq's built-in Tor is bypassed.
6. **First launch is slow** — Bisq needs to connect to the P2P trading network and sync, which can take several minutes.

## What Is Unchanged from Upstream

Expand All @@ -137,7 +144,7 @@ Build and development workflow follow the StartOS packaging guide: <https://docs

```yaml
package_id: bisq
image: custom dockerBuild (multi-stage: ubuntu + baseimage-kasmvnc, flattened via FROM scratch)
image: custom dockerBuild (multi-stage: ubuntu + pinned baseimage-selkies, flattened via FROM scratch)
architectures: [x86_64]
volumes:
main: /config
Expand All @@ -148,12 +155,14 @@ dependencies:
startos_managed_env_vars:
- CUSTOM_USER
- PASSWORD
- BITCOIND_PEER_ADDR
- PUID
- PGID
- TZ
- TITLE
- S6_CMD_WAIT_FOR_SERVICES_MAXTIME
- S6_VERBOSITY
- NO_DECOR
actions:
- set-password
```
10 changes: 9 additions & 1 deletion UPDATING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Updating the upstream version

This package wraps the Bisq desktop application (from `bisq-network/bisq`), installing the upstream `.deb` published at `bisq.network/downloads/v<version>/` into a KasmVNC webtop image and verifying it against a pinned PGP key.
This package wraps the Bisq desktop application (from `bisq-network/bisq`), installing the upstream `.deb` published at `bisq.network/downloads/v<version>/` into a LinuxServer Selkies webtop image and verifying it against a pinned PGP key.

## Determining the upstream version

Expand All @@ -15,3 +15,11 @@ This package wraps the Bisq desktop application (from `bisq-network/bisq`), inst
## Applying the bump

- **Bisq**: in `Dockerfile`, update the `ARG BISQ_VERSION=...` line to the new version (without the leading `v`). If upstream rotated signers, also update `ARG BISQ_PGP_KEY=...` to the new fingerprint.

- **Selkies base image**: `Dockerfile` pins the multi-architecture `ghcr.io/linuxserver/baseimage-selkies:debiantrixie` image by OCI index digest. Verify the current tag and architectures with:

```
docker buildx imagetools inspect ghcr.io/linuxserver/baseimage-selkies:debiantrixie
```

When intentionally updating the base, replace the digest in the `FROM` line and confirm that the flattened image's `ENV` block still matches the base image's runtime environment.
16 changes: 8 additions & 8 deletions instructions.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# Bisq

Bisq is a JavaFX desktop application. This package runs it inside a browser-accessible Linux desktop (KasmVNC webtop), so the **Bisq Desktop** interface opens the full Bisq UI in your browser rather than a web app.
Bisq is a JavaFX desktop application. This package runs it inside a browser-accessible Linux desktop streamed by Selkies, so the **Bisq Desktop** interface opens the full Bisq UI in your browser rather than a web app.

## Documentation

- [Bisq Wiki](https://bisq.wiki/) — the upstream documentation for trading, wallet management, and the Bisq protocol.

## What you get on StartOS

- A **Bisq Desktop** interface that streams the Bisq JavaFX application to your browser over KasmVNC.
- A single backed-up `main` volume that holds your Bisq wallet, trades, offers, and KasmVNC settings.
- The Bisq network profile is regenerated on every start so that Tor is handled at the StartOS network layer and peer discovery is left to Bisq's defaults.
- A **Bisq Desktop** interface that streams the Bisq JavaFX application to your browser over Selkies.
- A single backed-up `main` volume that holds your Bisq wallet, trades, offers, and Selkies settings.
- The Bisq network profile is regenerated on every start so that Tor is handled at the StartOS network layer and Bitcoin traffic uses your StartOS Bitcoin node's private, trusted peer connection.

## Getting set up

1. Install **Bitcoin** first if you have not already — Bisq requires a Bitcoin full node and will not start without it.
2. After install, StartOS posts a critical task **Set your admin password**. Run it and copy the generated `bisq` username and password to a password manager — you'll need them to log into the desktop.
3. Start the service and open the **Bisq Desktop** interface. Enter the `bisq` username and the password from step 2 at the KasmVNC login prompt.
3. Start the service and open the **Bisq Desktop** interface. Enter the `bisq` username and the password from step 2 when your browser prompts for credentials.
4. Bisq's own first-run wizard appears in the desktop. Walk through it to create or restore a wallet. The first connection to the P2P trading network can take several minutes.

## Using Bisq

### Bisq Desktop

The **Bisq Desktop** interface is the full Bisq application rendered in your browser. Everything you would do on a native Bisq install — make and take offers, manage your wallet, participate in disputes, vote in the DAO — happens here. KasmVNC handles keyboard, mouse, and clipboard between your browser and the Bisq desktop.
The **Bisq Desktop** interface is the full Bisq application rendered in your browser. Everything you would do on a native Bisq install — make and take offers, manage your wallet, participate in disputes, vote in the DAO — happens here. Selkies handles keyboard, mouse, audio, and clipboard between your browser and the Bisq desktop.

### Actions

- **Set Admin Password** — generate a new random password for the KasmVNC login and display the credentials. Run this if you lose the password or want to rotate it.
- **Set Admin Password** — generate a new random password for the Selkies login and display the credentials. Run this if you lose the password or want to rotate it.

## Limitations

- **x86_64 only.** Bisq does not ship official ARM builds.
- **The Bisq network profile is regenerated on every start.** Manual edits to `bisq.properties` inside the container do not persist; Tor-for-BTC is intentionally disabled because StartOS manages Tor at the network layer.
- **The Bisq network profile is regenerated on every start.** Manual edits to `bisq.properties` inside the container do not persist; Tor-for-BTC is intentionally disabled because StartOS manages Tor at the network layer, and the Bitcoin peer is set to your local Bitcoin service.
Loading