Skip to content

Electron Desktop

ByteBox can run as an Electron desktop app. Currently available for Linux.

Pre-built Linux installers for v2.4.0:

Terminal window
npm run electron:dev

This script compiles Electron main/preload code, launches Next dev server, waits for http://localhost:1334, then opens Electron.

Terminal window
npm run electron:build:linux
  • Development: Electron points to Next dev server on port 1334.
  • Packaged: Electron starts a bundled Next production server in-process on port 1335.

On startup, electron/main.ts:

  1. Resolves user data directory
  2. Sets DATABASE_URL to user DB path
  3. Applies pending SQL migrations from bundled prisma/migrations
  4. Boots Next server and opens the window

Packaged app DB lives in OS user data path and survives upgrades.

Examples:

  • Linux: ~/.config/ByteBox/bytebox.db
  • Main process uses secure defaults (contextIsolation, sandbox, no node integration in renderer).
  • External links open in system browser.