Skip to content

docs(proposals): run the desktop stack in Docker, with CPU and CUDA images - #2098

Merged
AnishSarkar22 merged 1 commit into
MODSetter:devfrom
AnishSarkar22:feat/docker-proposal
Oct 1, 2026
Merged

AnishSarkar22 merged 1 commit into
MODSetter:devfrom
AnishSarkar22:feat/docker-proposal

Conversation

@AnishSarkar22

@AnishSarkar22 AnishSarkar22 commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • Adds docs/proposals/docker/README.md: the desktop app's stack, without Electron, as one container in docker/local/:
    • A supervisor shared with Electron runs the API, the workers, llama-server, audiocpp and sd-server on loopback, over one /data volume.
    • Caddy, in the same container, is the only listener. It serves the frontend, proxies the API under /api, and refuses /api/internal/*.
    • Without a password, Caddy answers only requests to localhost. With SURFSENSE_PASSWORD, it uses basic auth, over HTTPS when a domain is set.
    • The license is the desktop's offline Keygen file. There are no accounts: one user per install.
    • It also lists the file layout, the image stages, the compose file, the CI workflow and the path off the legacy stack.
  • Adds docs/proposals/docker/gpu.md:
    • Image variants: CPU, -cuda (12.8) and -cuda126 (12.6), on amd64 and arm64, named as the legacy backend's are.
    • Chat and image generation run on the GPU; parsing, embeddings and voice stay on the CPU.
    • Each image carries one GPU backend.
    • A CUDA image refuses to start when no GPU is visible, unless SURFSENSE_ALLOW_CPU=1.
  • Adds ADR 0035, which records the decision.
  • Updates the Status lines of ADR 0004 and ADR 0012, and the ADR index. ADR 0035 supersedes, for Docker only:
    • ADR 0004: Docker out of scope, and its loopback rule;
    • ADR 0012: no CUDA.
  • Docs only: no code changes, and nothing in the legacy docker/ folder changes.

Why

  • The plan is for this one image to replace the legacy self-host images (surfsense-backend, surfsense-web) and their compose stack.
  • Self-hosters can run the current app on a server, a NAS or a GPU box without Electron.
  • The license and scraper API backend in surfsense_backend isn't affected.

Fixes #

How to test

  • python scripts/check_docs.py
  • Read the two proposals and ADR 0035. Points to check:
    • one container rather than several;
    • Caddy's Host check as the guard when no password is set;
    • keeping -cuda126;
    • refusing to start without a GPU.

High-level PR Summary

This PR proposes running the desktop app's stack in Docker as a single container, replacing the legacy multi-service self-host architecture. The proposal introduces CPU and CUDA image variants (-cuda and -cuda126) that run the API, workers, and model servers via a shared supervisor, with Caddy as the only listener handling authentication and reverse proxying. The decision is recorded in ADR 0035, which partially supersedes ADRs 0004 and 0012 for Docker deployments. This is documentation only—no code changes are included, and the legacy docker/ folder remains untouched.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 docs/adr/0035-docker-compose-runs-the-desktop-stack.md
2 docs/proposals/docker/README.md
3 docs/proposals/docker/gpu.md
4 docs/adr/0004-desktop-app-is-its-own-tree.md
5 docs/adr/0012-vulkan-only-gpu-backend.md
6 docs/adr/README.md

Need help? Join our Discord

…mages

The desktop app's stack, without Electron, ships as one container in
docker/local/: a supervisor shared with Electron runs the API, the
workers and the model servers on loopback, and Caddy is the only
listener. Without a password it answers only localhost; with one it
uses basic auth, over HTTPS when a domain is set. Images come as CPU,
-cuda (12.8) and -cuda126 (12.6) on amd64 and arm64. The license is the
desktop's offline file. The legacy stack in docker/ is not changed.

ADR 0035 records the decision and supersedes parts of ADR 0004 (Docker
out of scope, the loopback rule) and ADR 0012 (no CUDA), for Docker
only.
@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

@AnishSarkar22 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@AnishSarkar22
AnishSarkar22 merged commit 97d8399 into MODSetter:dev Oct 1, 2026
5 of 8 checks passed
@coderabbitai

coderabbitai Bot commented Oct 1, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: MODSetter/SurfSense/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: b08c37c5-73b5-4890-aef6-50850385ee83

📥 Commits

Reviewing files that changed from the base of the PR and between ed1da3a and 953ea93.

📒 Files selected for processing (6)
  • docs/adr/0004-desktop-app-is-its-own-tree.md
  • docs/adr/0012-vulkan-only-gpu-backend.md
  • docs/adr/0035-docker-compose-runs-the-desktop-stack.md
  • docs/adr/README.md
  • docs/proposals/docker/README.md
  • docs/proposals/docker/gpu.md
 ___________________________________________________________________________________________________________________________________
< Keep knowledge in plain text. Plain text won't become obsolete. It helps leverage your work and simplifies debugging and testing. >
 -----------------------------------------------------------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant