Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c333aab
feat: deploy central role with auto-compose.sh
fluxion9 Nov 17, 2026
7c9c9dd
Merge pull request #2 from fluxion9/feat/central-auto-compose
fluxion9 Nov 17, 2026
f605db5
feat: redesign gateway management with rename and delete
fluxion9 Nov 17, 2026
081228f
feat: deploy gateway role (Console + agent) with auto-compose.sh
fluxion9 Nov 17, 2026
99ae4b9
feat: one-command standalone setup and a deployment guide
fluxion9 Nov 17, 2026
e33835d
feat: design the central sign-in page
fluxion9 Nov 17, 2026
2e1f069
feat: pick the image from the checkout's GitHub repository
fluxion9 Nov 17, 2026
177af38
fix: take every image and the updater's trust from the checkout repos…
fluxion9 Nov 17, 2026
586cc1c
feat: allow central passwords from 7 characters
fluxion9 Nov 17, 2026
9f79528
feat: let central users change their password
fluxion9 Nov 17, 2026
1b87d82
fix: never roll a gateway back onto an image without the agent
fluxion9 Nov 17, 2026
c6634ba
fix: move the gateway fallback port off ChirpStack's 3001
fluxion9 Nov 17, 2026
8c36db5
fix: always show a picture after a Browser page loads
fluxion9 Nov 18, 2026
a1be67e
feat: redesign the central top bar, gateway menu and select arrows
fluxion9 Nov 18, 2026
973e970
feat: let central deselect gateways and work on the central server
fluxion9 Nov 18, 2026
01dbee8
fix: try both loopback addresses for localhost in the central Browser
fluxion9 Nov 18, 2026
8927c53
feat: run the Browser engine from auto-compose with BROWSER_ENABLED
fluxion9 Nov 18, 2026
3cf1788
feat!: remove the Browser app
fluxion9 Nov 18, 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
24 changes: 10 additions & 14 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -51,31 +51,27 @@ STREAMR_CRONSCHEDULE="0 * * * *" # Every hour
# CENTRAL_TRUSTED_PROXIES=127.0.0.1,::1
# One-time token from central enrollment; remove it after the credential file exists.
# AGENT_ENROLLMENT_TOKEN=REPLACE_WITH_ONE_TIME_TOKEN
# Central bootstrap only; password must have at least 16 characters.
# Central bootstrap only; password must have at least 7 characters.
# CENTRAL_ADMIN_USERNAME=admin
# CENTRAL_ADMIN_PASSWORD=REPLACE_WITH_A_UNIQUE_LONG_PASSWORD
# Loopback authenticated fallback. Never publish this port through a proxy.
# GATEWAY_FALLBACK_PORT=3001
# GATEWAY_FALLBACK_PORT=3011 (not 3001: ChirpStack's Basic Station bridge uses it)
# Gateway-owned tunnel policy; central cannot override these targets.
# AGENT_SSH_PORT=22
# AGENT_BROWSER_ALLOW_LAN=false
# AGENT_BROWSER_PORTS=80,443,3000,8080,8090
# Used only by compose.central.yaml's TLS proxy.
# CENTRAL_DOMAIN=console.example.invalid
# Central with no gateway selected: ChirpStack opens this dashboard (an origin, no path),
# and Terminal signs in to this server's own SSH (password login) on CENTRAL_SSH_PORT.
# CENTRAL_CHIRPSTACK_URL=https://chirpstack.example.invalid
# CENTRAL_SSH_PORT=22

# Optional browser image (Chromium is absent from the default gateway image).
# BROWSER_IMAGE=ghcr.io/fluxion9/console-browser:feat-centralized-console
# BROWSER_EXECUTABLE=/usr/bin/chromium
# Images are not configured here. ./auto-compose.sh uses ghcr.io/<owner>/<repo> from this
# checkout's GitHub origin remote (plus -updater); pin a build with --image.

# Optional separate updater; disabled locally by default. Never mount Docker in agent.
# Optional signed updater on gateways; ./auto-compose.sh starts it when this is true and
# trusts only images signed by this checkout's repository. Never mount Docker in agent.
# REMOTE_UPDATES_ENABLED=false
# UPDATER_IMAGE=ghcr.io/fluxion9/console-updater:feat-centralized-console
# UPDATER_IMAGE_REPOSITORY=ghcr.io/fluxion9/console
# UPDATER_SOURCE_REPOSITORY=fluxion9/Console
# UPDATER_ALLOWED_REFS=refs/heads/main
# Explicit test-only trust: refs/heads/main,refs/heads/feat/centralized-console
# COMPOSE_PROJECT_NAME=console
# UPDATER_DEPLOY_DIRECTORY=/absolute/host/path/to/Console
# UPDATER_RECONNECT_TIMEOUT_MS=180000
# Registry/API access token for gh verification, only in the updater container.
# UPDATER_GITHUB_TOKEN=REPLACE_WITH_READ_ONLY_VERIFICATION_TOKEN
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
fail-fast: false
matrix:
platform: [linux/amd64, linux/arm64]
variant: [console, browser, updater]
variant: [console, updater]
include:
- platform: linux/amd64
runner: ubuntu-latest
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
create-manifests:
strategy:
matrix:
variant: [console, browser, updater]
variant: [console, updater]
needs: build-platform
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
Expand Down
11 changes: 0 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,6 @@ ENTRYPOINT ["/entrypoint.sh"]
# Start app
CMD [ "npm", "start" ]

# Optional browser image. Default builds below never install Chromium.
FROM runtime AS browser
RUN apk add --no-cache chromium openssl \
&& mkdir -p /opt/app/.data /opt/app/src/extensions /opt/app/dist/extensions \
&& chown -R node:node /opt/app/.data /opt/app/src/extensions /opt/app/dist/extensions
ENV BROWSER_EXECUTABLE=/usr/bin/chromium
USER node
# Build-only smoke check has no target service/network. Runtime requires sandbox.
RUN timeout 30 chromium --headless --no-sandbox --disable-gpu --disable-dev-shm-usage --no-first-run --disable-background-networking --proxy-server=http://127.0.0.1:9 --dump-dom about:blank > /tmp/browser-smoke.html \
&& grep -q '<html' /tmp/browser-smoke.html && rm /tmp/browser-smoke.html

# Only this opt-in service receives the Docker socket.
FROM runtime AS updater
RUN apk add --no-cache docker-cli docker-cli-compose github-cli
Expand Down
81 changes: 23 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,54 +10,20 @@ A modular, extensible service console for providers on the M3tering protocol. Fe

## Quick Setup

1. **Clone/Update**

```bash
git clone https://github.com/M3tering/Console.git
# or
cd Console/ && git pull
```

2. **Environment Variables**
Create `.env` file:

```
# Server Configuration
PORT=3000
CONSOLE_HOST=127.0.0.1
CONSOLE_USERNAME=admin
CONSOLE_PASSWORD=<a-strong-unique-password>

# Module Configuration
BACKEND_MODULES="core/arweave,core/is_on,core/prover,core/streamr"
UI_MODULES="streamr:core/streamr/ui"

# ChirpStack Configuration
API_TOKEN=...
APPLICATION_ID=...
CHIRPSTACK_HOST=localhost

# Contract & Network Configuration
CONTRACT_LABEL=M3ters
MAINNET_RPC=https://ethereum-sepolia-rpc.publicnode.com #alt https://eth-sepolia.g.alchemy.com/v2/<YOUR_API_KEY>
ETHEREUM_PRIVATE_KEY="..."
ROLLUP_CONTRACT_ADDRESS="0x9a9ED9b9A9BEC10d1B5E41b1873E78d19501D5Fa"

# Streamr Configuration
STREAMR_STREAM_ID="0x567853282663b601bfdb9203819b1fbb3fe18926/m3tering/test"
STREAMR_CRONSCHEDULE="0 * * * *" # Every hour

# Optional: Prover Node (publishing is disabled when unset)
# PREFERRED_PROVER_NODE="https://prover.m3ter.ing"
# PROVER_CRONSCHEDULE="0 0 * * *" # Every 24 hours
```

3. **Docker Build and Run**

```bash
sudo docker compose down
sudo docker compose up -d
```
One command installs and updates every setup: a standalone gateway, a central
server, or a gateway managed by central. **Full instructions:
[docs/deployment-guide.md](docs/deployment-guide.md).**

```bash
git clone https://github.com/fluxion9/Console.git
cd Console
./auto-compose.sh # first run creates .env from the template
nano .env # fill in API_TOKEN, APPLICATION_ID, ETHEREUM_PRIVATE_KEY
./auto-compose.sh # starts Console; open http://<this-machine>:3000
```

Set `CONSOLE_ROLE=central` or `CONSOLE_ROLE=gateway` in `.env` for the other
setups. Update any machine later with `git pull && ./auto-compose.sh`.

## Other Docker Commands

Expand Down Expand Up @@ -644,7 +610,8 @@ survive desktop theme changes and reloads. Native content, dialogs, and terminal
colors follow the chosen palette. Embedded external websites retain their own
appearance controls; the containing window follows the application setting.

To update the existing Docker deployment from GitHub Actions images:
To update the existing Docker deployment from GitHub Actions images (see
[docs/deployment-guide.md](docs/deployment-guide.md) for central and managed gateways):

```sh
./auto-compose.sh
Expand All @@ -655,7 +622,8 @@ To update the existing Docker deployment from GitHub Actions images:

Docker and its Compose plugin must already be installed. The script identifies
this checkout's Compose project and running Console image, preserves its GHCR tag
by default (otherwise `ghcr.io/m3tering/console:main`), and lets Docker select the
when it comes from this checkout's GitHub repository (otherwise it uses
`ghcr.io/<owner>/<repo>:main` from the `origin` remote), and lets Docker select the
native architecture from the published manifest. It pulls before stopping Console,
then stops/removes only that service, starts the updated image and waits for
`/healthz`. Failed readiness prints logs and restores the previous image when
Expand All @@ -672,11 +640,7 @@ The old **M3ters** meter-list application has been removed from the desktop,
along with its exclusive `/delete-meter` UI endpoint. The collector's database,
MQTT service, and meter records are preserved. The removed M3ter Manager is no longer available.

The Browser uses an optional isolated Chromium engine inside the Console window,
including Google searches, back/forward navigation, copy/paste and touch scrolling.
No site is embedded in an iframe. Without the optional browser image it shows an
engine-unavailable message while the rest of Console remains usable. See the
[Browser deployment instructions](docs/centralized/deployment.md#optional-browser-engine).
The Browser app has been removed, along with its optional Chromium image.

`compose.yaml` passes the existing `.env` into the single Console container,
which hosts the collector. The update script leaves that file and persistent
Expand Down Expand Up @@ -721,7 +685,7 @@ integration tests are complete.
The default `standalone` role preserves the local collector and LAN desktop.
`central` adds authenticated multi-gateway access; `gateway` keeps a local fallback
Console while an outbound agent owns MQTT. The same default multi-architecture
image contains both entry points. Browser and updater are optional Docker targets.
image contains both entry points. The signed updater is an optional Docker target.

The central selector identifies each gateway and displays uncertain, reconciled
and pending operation counts. Stored decisions are keyed by ChirpStack event ID.
Expand All @@ -730,8 +694,9 @@ reconciliation; uncertainty never generates an OFF reply or automatic second
attempt. The next report supersedes an unresolved old reply. Existing revenue
checks remain fail-closed for actual new decisions.

Central Terminal and ChirpStack use purpose-limited gateway tunnels. Browser local
traffic goes to the selected gateway, never central's internal network. The
Central Terminal and ChirpStack use purpose-limited gateway tunnels.
With **Central server** selected (no gateway), Terminal and ChirpStack work on
the central machine itself; see the [deployment guide](docs/deployment-guide.md#working-on-the-central-server-itself). The
separate, owner-enabled updater verifies provenance and replaces Console/agent by
digest together, with rollback and persistent data preservation.

Expand Down
Loading
Loading