Files
2026-05-14 02:27:26 +01:00

87 lines
3.2 KiB
Markdown

# KlipperAnywhere
KlipperAnywhere is an open-source, self-hosted remote access layer for 3D printers.
The first target is Klipper printers running Moonraker, with a design that can later
support OctoPrint, camera streams, notifications, and failure detection.
## Goals
- Self-hosted control plane with no mandatory third-party cloud.
- Secure remote access to Moonraker, Mainsail, Fluidd, and webcams.
- Printer-side agent that only opens outbound connections.
- Multi-printer support from a single server.
- Clear permission boundaries for read-only monitoring and active printer control.
- Optional integrations for notifications and AI-based failure detection.
## Non-Goals For The MVP
- Replacing Mainsail or Fluidd.
- Building a slicer, print queue manager, or firmware manager.
- Requiring inbound firewall or router port forwarding to the printer network.
- Training a custom failure-detection model before the access layer is stable.
## MVP Scope
1. A self-hosted server that users can run with Docker Compose.
2. A printer-side agent that connects to the server over a mutually authenticated tunnel.
3. Reverse proxy access to Moonraker and the printer UI.
4. Webcam snapshot and MJPEG/WebRTC relay support.
5. Basic user auth, printer registration, and access tokens.
6. Audit logging for sensitive actions such as emergency stop, pause, resume, and file upload.
## Proposed Components
- `server`: Public HTTPS entry point, user auth, printer registry, tunnel broker, reverse proxy.
- `agent`: Lightweight service installed near the printer, connects to Moonraker and local webcams.
- `web`: Management UI for users, printers, sessions, and connection health.
- `docs`: Architecture, deployment, threat model, and operating guides.
## Architecture
See [docs/architecture.md](docs/architecture.md).
## Local Development
See [docs/development.md](docs/development.md).
## Agent Configuration
See [docs/agent-config.md](docs/agent-config.md).
## Agent Installation
See [docs/install-agent.md](docs/install-agent.md).
## Authentication
See [docs/auth.md](docs/auth.md).
## Security Principles
- The printer network should not need exposed inbound ports.
- The agent should authenticate the server before sending printer traffic.
- Every printer should have scoped credentials that can be revoked independently.
- Remote access should support read-only mode.
- Dangerous actions should be logged and optionally gated behind confirmation.
## Development Status
This repository has a local Docker Compose development stack with a Go server,
Go printer-side agent, mock Moonraker service, authenticated dashboard, Moonraker
proxy routes, camera snapshot/stream relay, and a first-pass Mainsail/Fluidd UI
proxy. The current server defaults printer control traffic to read-only mode.
## Printer Agent Target
The printer-side agent should be written in Go and distributed as a single binary.
The initial release should target common Klipper hosts and rooted printer appliances:
- Linux `arm64`
- Linux `armv7`
- Linux `mipsle`, if required by Creality-style embedded boards
- Linux `amd64`
The installer should support full Linux hosts with `systemd`, OpenRC or SysV init,
plus constrained embedded firmware where only BusyBox-style init scripts or manual
startup hooks are available.