Installation¶
Two Deployment Paths¶
| Path | Target Audience | Method |
|---|---|---|
| Revolution Pi | Industrial operators | scripts/install-revpi.sh — fully automated |
| Raspberry Pi 3/4/5 | Makers, home automation | scripts/install-rpi.sh — fully automated, RPi-optimised |
| Development (local) | Developers | docker compose up or local services |
For most users
The easiest way to install WebMACS is the appropriate install script in scripts/.
It handles Docker installation, credential generation, cgroup configuration, and service startup — no manual setup required.
Production Installation (Recommended)¶
Revolution Pi — scripts/install-revpi.sh¶
Designed for KUNBUS Revolution Pi (Connect, Connect 4, Connect S) and any Debian/Ubuntu ARM server:
Or via one-liner (fresh device):
curl -sSL https://raw.githubusercontent.com/stefanposs/webmacs/main/scripts/install-revpi.sh | sudo bash
Raspberry Pi 3/4/5 — scripts/install-rpi.sh¶
Designed for consumer Raspberry Pi hardware (Pi 3B/3B+, Pi 4, Pi 5). Extends the RevPi script with additional RPi-specific setup:
- Enables cgroup memory in
cmdline.txt(required for Docker on RPi) - Configures swap automatically based on available RAM
- Sets optimal Docker storage driver (
overlay2+ journald) - Supports Raspberry Pi 3 with 1 GB RAM (minimum 750 MB)
Or via one-liner:
curl -sSL https://raw.githubusercontent.com/stefanposs/webmacs/main/scripts/install-rpi.sh | sudo bash
Reboot may be required (RPi only)
On a fresh Raspberry Pi OS installation, the script enables cgroup memory in cmdline.txt.
A reboot is required before Docker works correctly. The script will display a clear notice
if a reboot is needed.
What both scripts do (in order):
- Detects hardware and verifies compatibility
- Installs Docker + Docker Compose (if missing)
- Creates
/opt/webmacswith anupdates/directory structure - Generates a secure
.envfile with randomSECRET_KEY,DB_PASSWORD, and admin password - Extracts and loads Docker images from the bundle (SHA-256 verified)
- Starts all 4 containers via
docker-compose.prod.yml - Creates a systemd service (
webmacs.service) for auto-start on boot
Save Your Credentials
The admin password is shown only once during installation.
It is also stored in /opt/webmacs/.env.
After installation, open http://<device-ip> in a browser and log in.
Using scripts/build-update-bundle.sh¶
Developers use this script to create the .tar.gz update bundle that install.sh consumes:
What the script does:
- Builds all Docker images via
docker compose build --no-cache - Tags images with the version number
- Exports images to a single
images.tar - Computes SHA-256 checksum
- Creates
manifest.jsonwith version, checksum, and image list - Packages everything into a
.tar.gzbundle
The resulting bundle is fully self-contained — it can be deployed to an airgapped device via USB stick.
CI/CD Alternative
Instead of building locally, push a git tag (v2.1.0) and GitHub Actions builds a multi-arch bundle automatically.
See OTA Updates for details.
Development Setup¶
Docker Compose for Development Only
The docker-compose.yml in the project root is intended for local development.
For production deployments, always use scripts/install.sh with the production compose file.
Docker (Full Stack)¶
The fastest way to spin up the entire stack locally:
This spins up:
| Service | Port | Description |
|---|---|---|
db |
5432 | PostgreSQL 17-alpine |
backend |
8000 | FastAPI (Uvicorn) |
frontend |
80 | Vue 3 SPA (Nginx) |
controller |
— | IoT telemetry agent |
Verify everything is healthy:
Local Services (Without Docker)¶
For faster iteration without rebuilding containers:
Prerequisites (Development)¶
| Tool | Version | Purpose |
|---|---|---|
| Python | 3.13+ | Backend & Controller |
| Node.js | 22+ | Frontend build |
| PostgreSQL | 17+ | Database |
| just | 1.x | Task runner (optional, recommended) |
Backend¶
cd backend
uv sync --all-extras
uv run uvicorn webmacs_backend.main:create_app --factory --reload --port 8000
Frontend¶
Controller¶
Install just (Task Runner)¶
# macOS
brew install just
# Linux
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
# Windows (scoop)
scoop install just
Then run just from the project root to see all available commands:
Next Steps¶
- Quick Start — first login and experiment
- Configuration — environment variables reference