Dashboard service¶
The triaina service runs on the Raspberry Pi as a systemd unit. It starts on boot, restarts within 5 s if it crashes, and serves the dashboard on your LAN:
http://triaina.local:8080/
It talks to the printer's Moonraker over the network, like Fluidd does. Nothing is installed on the printer apart from the Klipper macros.
Install¶
On the Pi, in the triaina clone (Raspberry Pi setup first):
scripts/setup_pi.sh --service
sudo nano /etc/triaina/config.toml # set [printer] host: the printer's IP, or mkspi.local
sudo systemctl restart triaina
The script is idempotent. To update after git pull, run it again: it
reinstalls the package and restarts the service. It never overwrites an
existing config file.
| What | Where |
|---|---|
| Code and venv | /opt/triaina/.venv |
| Config | /etc/triaina/config.toml (from deploy/config.example.toml) |
| Jobs database, uploads, generated G-code and previews | /var/lib/triaina |
| Unit | /etc/systemd/system/triaina.service (from deploy/triaina.service) |
| Runs as | system user triaina, no login shell |
| Logs | journalctl -u triaina -f |
Running it by hand¶
python -m triaina serve [--config PATH] [--host ADDR] [--port N] [--reload]
| Option | Default | Meaning |
|---|---|---|
--config |
$TRIAINA_CONFIG, then /etc/triaina/config.toml |
Config file; missing means defaults |
--host |
[server] bind |
Listen address |
--port |
[server] port |
Port; 0 picks a free one |
--reload |
off | Development: restart on code changes (./dev run uses it) |
Exit code 2 means the config file is invalid; the error names the key.
Configuration¶
| Section | Key | Default | Meaning |
|---|---|---|---|
[printer] |
host |
mkspi.local |
Printer address or full URL |
port |
7125 |
Moonraker port | |
api_key |
none | Only if Moonraker authorization is on | |
timeout |
10 |
Seconds per Moonraker request | |
web_url |
http://<host>/ |
Fluidd link in the dashboard | |
[server] |
bind |
0.0.0.0 |
Listen address on the Pi |
port |
8080 |
Dashboard port | |
auth_token |
none | Require a token; see below | |
[paths] |
data_dir |
/var/lib/triaina |
Jobs and files |
[cut] |
max_feed, default_feed, z_threshold |
1500, 1500, 0 |
Preprocessor settings; max_feed also caps design cuts |
cut_feed, travel_feed |
1200, 3000 |
Design jobs: cutting and travel speed, mm/min | |
blade_offset, cutoff_deg, overcut |
0.25, 20, 1.0 |
Blade-offset compensation | |
margin, bed_x, bed_y |
5, 225, 225 |
Usable area for designs, mm | |
[camera] |
stream_url |
none | MJPEG stream shown on the dashboard |
[print] |
slicer |
first of prusa-slicer, PrusaSlicer on PATH |
Slicer command for 3D jobs |
max_z |
265 |
Build height for fitting models |
An unknown key or section stops the service with a clear error in the journal instead of being ignored.
Local only¶
The service is for your home network. It has no TLS and, by default, no login.
To require a token, set [server] auth_token to a long random string
(openssl rand -hex 24), restart, and open the dashboard once as
http://triaina.local:8080/?token=<token>; the browser remembers it. API
clients send Authorization: Bearer <token>.
Do not forward port 8080 from your router. For remote access use a VPN to your home network.
Behaviour on restart¶
| Situation | What happens |
|---|---|
| Pi reboots | Service starts after the network is up; the dashboard is back within about a minute |
| Service crashes | systemd restarts it after 5 s |
| A job was being uploaded or converted | Marked failed ("interrupted by a service restart"); upload or start it again |
| A job was running on the printer | Keeps running on the printer; the dashboard picks it up again from Moonraker |
| Printer offline | Dashboard shows "offline" and keeps polling; nothing is sent |
| Klipper restarts mid-job | The job is marked failed after 15 s ("printer restarted during the job") |
Uninstall¶
sudo systemctl disable --now triaina
sudo rm /etc/systemd/system/triaina.service && sudo systemctl daemon-reload
sudo rm -rf /opt/triaina # keep /etc/triaina and /var/lib/triaina if you may reinstall