Toes' Bun fetch auto-decompresses responses. If Go sends gzip through our proxy, toes gets raw gzip bytes it can't handle. Stripping accept-encoding tells Go to send uncompressed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| bin | ||
| docs | ||
| scripts | ||
| src | ||
| .gitignore | ||
| .npmrc | ||
| bun.lock | ||
| CLAUDE.md | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Tronbyt
Run a Tronbyt server as a toes app. Tronbyt is a self-hosted replacement for Tidbyt's cloud — it renders Starlark apps into WebP frames and pushes them to Tidbyt LED displays over your local network.
This app spawns the pre-built Tronbyt Go binary as a subprocess and proxies all traffic (HTTP + WebSocket) to it over a unix socket. The Go server handles everything — web dashboard, device connections, app rendering. Bun just sits in front and makes it a good toes citizen.
Install
1. Deploy to your toes server
git remote add toes http://git.toes.local/tronbyt
git push toes main
Pushing to the git tool deploys the app, runs bun install (which downloads the binary), and starts it automatically.
2. The binary
The Tronbyt Go binary is downloaded automatically during bun install via the postinstall script. It assumes you're running on a Raspberry Pi (linux-arm64) — which is what toes is designed for.
The binary is gitignored since it's platform-specific and ~50MB. If you need to re-download it or the postinstall didn't run, you can grab it manually:
curl -L -o bin/tronbyt-server-linux-arm64 \
https://github.com/tronbyt/server/releases/latest/download/tronbyt-server-linux-arm64
chmod +x bin/tronbyt-server-linux-arm64
If the binary already exists in bin/, the postinstall skips the download.
3. First boot
On first start, the server clones the community Starlark apps repo (~15 seconds). With PRODUCTION=false (the default), firmware downloads are skipped.
All data (SQLite DB, cloned apps, firmware) is stored in the app's DATA_DIR, which persists across restarts and deploys.
Configure your Tidbyt
- Flash your Tidbyt with Tronbyt firmware (see firmware flashing docs)
- During device setup, set the Image URL to:
The device ID is assigned when you add the device in the Tronbyt web dashboard.http://tronbyt.toes.local/<device-id>/next
Important: The Image URL must be the full path including /<device-id>/next — the device uses it exactly as-is.
Environment Variables
Set these through toes env tronbyt to override defaults:
| Variable | Default | Description |
|---|---|---|
PRODUCTION |
false |
Set true to enable firmware downloads for OTA updates |
SINGLE_USER_AUTO_LOGIN |
true |
Auto-login without password (good for home network) |
SYSTEM_APPS_AUTO_REFRESH |
true |
Auto-refresh community apps repo every 12h |
How the binary is managed
bun installrunsscripts/postinstall.sh, which downloadstronbyt-server-linux-arm64intobin/if it doesn't already exist- At runtime, the app looks for a binary in
bin/matching the current platform (tronbyt-server-{darwin|linux}-{arm64|amd64}) - If the binary isn't found, the app logs an error with the download URL and the expected filename
- The binary runs as a child process with
stdout/stderrinherited (logs show up in toes) - On shutdown (SIGTERM from toes), the app forwards SIGTERM to the Go process
- The unix socket is created in
DATA_DIR/tronbyt.sockand cleaned up on startup to handle stale sockets from crashes