6ede33ccdb
Build and Push Docker Images / create_manifest (web, surfsense-web, , cpu) (push) Has been cancelled
Build and Push Docker Images / finalize_release (push) Has been cancelled
Obsidian Plugin Lint / lint (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, cpu, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64, , runner, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_web, cpu, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64, , runner, false, cpu) (push) Has been cancelled
Build and Push Docker Images / compute_version (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cpu, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, , production, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cpu, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, , production, false, cpu) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu126, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, -cuda126, production, true, cuda126) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu126, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, -cuda126, production, true, cuda126) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu128, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64, -cuda, production, true, cuda) (push) Has been cancelled
Build and Push Docker Images / build (./surfsense_backend, cu128, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64, -cuda, production, true, cuda) (push) Has been cancelled
Build and Push Docker Images / verify_digests (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, , cpu) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, -cuda, cuda) (push) Has been cancelled
Build and Push Docker Images / create_manifest (backend, surfsense-backend, -cuda126, cuda126) (push) Has been cancelled
62 lines
1.7 KiB
Markdown
62 lines
1.7 KiB
Markdown
# SurfSense Desktop
|
||
|
||
Electron wrapper around the SurfSense web app. Packages the Next.js standalone build into a native desktop application with OAuth support, deep linking, and system browser integration.
|
||
|
||
## Prerequisites
|
||
|
||
- Node.js 18+
|
||
- pnpm 10+
|
||
- The `surfsense_web` project dependencies installed (`pnpm install` in `surfsense_web/`)
|
||
|
||
## Development
|
||
|
||
```bash
|
||
pnpm install
|
||
pnpm dev
|
||
```
|
||
|
||
This starts the Next.js dev server and Electron concurrently. Hot reload works — edit the web app and changes appear immediately.
|
||
|
||
On **Linux**, `pnpm dev` runs Electron through `scripts/electron-dev.mjs`: it sets `ELECTRON_DISABLE_SANDBOX=1` for the sandbox issue and passes **`--ozone-platform=x11`** (XWayland) unless **`SURFSENSE_ELECTRON_WAYLAND=1`** is set, so dev tends to behave closer to X11 for shortcuts and Ozone. Packaged Linux builds are unchanged.
|
||
|
||
## Configuration
|
||
|
||
Two `.env` files control the build:
|
||
|
||
**`surfsense_web/.env`** — Next.js environment variables baked into the frontend at build time:
|
||
|
||
**`surfsense_desktop/.env`** — Electron-specific configuration:
|
||
|
||
Set these before building.
|
||
|
||
## Build & Package
|
||
|
||
**Step 1** — Build the Next.js standalone output:
|
||
|
||
```bash
|
||
cd ../surfsense_web
|
||
pnpm build
|
||
```
|
||
|
||
**Step 2** — Compile Electron and prepare the standalone output:
|
||
|
||
```bash
|
||
cd ../surfsense_desktop
|
||
pnpm build
|
||
```
|
||
|
||
**Step 3** — Package into a distributable (after steps 1–2):
|
||
|
||
```bash
|
||
pnpm dist:mac # macOS (.dmg + .zip)
|
||
pnpm dist:win # Windows (.exe)
|
||
pnpm dist:linux # Linux (.deb + .AppImage)
|
||
pnpm pack:dir # optional: unpacked app only → release/… (run that binary yourself)
|
||
```
|
||
|
||
**Step 4** — Find the output:
|
||
|
||
```bash
|
||
ls release/
|
||
```
|