ollama/ollama
Desktop app
The desktop app under app/ wraps the Ollama daemon in a native UI for macOS and Windows. It runs ollama serve as a background process, surfaces a tray icon, and opens the launcher in a webview.
Purpose
Lower the barrier to using Ollama on a personal machine: no terminal required to start the daemon, see what's running, sign in to Ollama Cloud, or trigger an ollama launch flow. The app is optional — power users can still use the CLI directly.
Directory layout
app/
├── README.md
├── ollama.iss # Inno Setup script (Windows installer)
├── ollama.rc # Windows resource file
├── assets/ # icons and platform images
├── auth/ # cred storage helpers
├── cmd/ # entry points for the GUI binary
├── darwin/ # macOS-specific code
├── dialog/ # cross-platform dialog helpers
├── format/ # human-readable formatters used by the UI
├── logrotate/ # log file rotation
├── server/ # spawn / health-check the daemon
├── store/ # local key/value config store
├── tools/ # build and packaging helpers
├── types/ # shared types between Go and the webview
├── ui/ # UI assets bundled into the webview
├── updater/ # in-app updater
├── version/ # build-stamped version info
├── webview/ # WKWebView / WebView2 host
└── wintray/ # Windows tray icon and menuKey abstractions
| Symbol | Location | Purpose |
|---|---|---|
| Tray menu | app/wintray/ (Windows), app/darwin/ (macOS) |
Status icon, menu items, notifications. |
| Daemon supervisor | app/server/ |
Spawns ollama serve, monitors its PID, restarts on crash. |
| Updater | app/updater/ |
Self-update by downloading new installers. |
| Webview host | app/webview/ |
Hosts the launcher UI assets in a native webview. |
| Local store | app/store/ |
Persists user preferences (start at login, telemetry opt-out, etc.). |
How it works
graph TD
User[user clicks tray icon] --> Tray[wintray / darwin tray]
Tray --> Menu[menu actions]
Menu -->|open launcher| Webview[webview window]
Menu -->|quit| Stop[stop daemon]
Tray --> Supervisor[daemon supervisor]
Supervisor -->|spawn| Daemon[ollama serve]
Supervisor -->|HTTP /api/version| Daemon
Daemon --> Sched[scheduler / runners]
Updater[in-app updater] -.poll.-> Releases[github releases]The supervisor in app/server/ starts the daemon as a child process and monitors /api/version. The webview is launched from the tray menu and points at the launch UI bundled under app/ui/.
Integration with the CLI
A recent commit history entry, app: align the app launch page with ollama launch (#15753), calls out the convergence: the desktop launcher and the CLI's ollama launch flow share the same set of integrations. Another commit, app/server: fix desktop app startup killing active ollama launch sessions (#15657), fixed a race where the desktop daemon supervisor was killing CLI-managed sessions.
Packaging
- Windows: Inno Setup script at
app/ollama.issdrives the installer;app/ollama.rcprovides resources for the executable. Released asOllamaSetup.exe. - macOS:
app/darwin/carries the App bundle; signing/notarization happens in CI. Released asOllama.dmg. - Linux: no first-party desktop app. Linux users run
ollama servedirectly from the install script.
Integration points
- Talks to the daemon through the same HTTP API as the CLI.
- Reads/writes the same model store under
~/.ollama/models/. - Shares signing keys with the CLI (
auth.GetPublicKey()fromauth/auth.go).
Entry points for modification
- Tray menu items:
app/wintray/orapp/darwin/. - Webview UI:
app/ui/(assets) andapp/webview/(host). - Updater logic:
app/updater/.
Key source files
| File | Purpose |
|---|---|
app/cmd/ |
The desktop binary's main package(s). |
app/server/ |
Daemon supervisor. |
app/wintray/ |
Windows tray icon. |
app/darwin/ |
macOS-specific surface. |
app/updater/ |
In-app updater. |
app/store/ |
Persistent user preferences. |
app/ollama.iss |
Windows installer script. |
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.