Skip to content

armgit / kokon

Public Imported from GitHub
0

Edit photos by describing the change, on your own GPU. A free, open-source alternative to Nano Banana and ChatGPT image editing: photos stay on your computer, no daily limit. One installer for Windows, Mac and Linux sets up the best open model (Qwen-Image 2.1). MCP server for AI agents.

Docs: other devices and Tailscale guide, Docker guide, 0.11.0 release notes

Gabriele Lozupone347f82f6887a
diff --git a/README.md b/README.md
index c3b9ec1..a049c00 100644
--- a/README.md
+++ b/README.md
@@ -173,6 +173,9 @@ seeds and times are in [marketing/showcase/PROMPTS.md](marketing/showcase/PROMPT
Intel cards use Mesa's Vulkan driver, installed on most desktops already. If apt prints
"Download is performed unsandboxed as root", that's harmless (apt can't read your home
folder); copy the .deb to `/tmp` first to avoid it.
+- **Server or Docker (NVIDIA):** Kokon without a window, used from a browser on any device. See
+ [docs/docker.md](docs/docker.md), or run `kokon-service` from the Linux packages
+ ([docs/remote-access.md](docs/remote-access.md#on-a-server-without-a-screen-linux)).
**2. Set up models.** On first launch Kokon shows your graphics card (or your Mac's chip and
memory), recommends a preset and downloads everything it needs. The download resumes if it is
@@ -465,8 +468,9 @@ Kokon makes only two kinds of network request:
downloaded only when you click **Update**, and installed only if their signature matches the
key built into the app.
-Creating, editing, the gallery, the MCP server and the API talk to `127.0.0.1` only. Logs never
-contain your prompts.
+Creating, editing, the gallery, the MCP server and the API talk to `127.0.0.1` only, unless you turn
+on access from other devices (Settings → Other devices, off by default, password required): then
+the browser interface is also reachable on your local network. Logs never contain your prompts.
You can check this yourself. While you work, watch `Kokon`, `kokon-service` and `sd-server` in
Resource Monitor's Network tab on Windows (or run `Get-NetTCPConnection -OwningProcess <pid>`),
@@ -554,6 +558,18 @@ General.
</details>
+<details>
+<summary><b>Can I use it from my phone or another computer?</b></summary>
+<br>
+
+Yes, in a browser. On the computer with the graphics card, open **Settings → Other devices**, set a
+password and open the address it shows on the other device, on the same network. Images are made and
+saved on that computer; the other device uploads photos and downloads results. From outside your home,
+use Tailscale or another VPN, never port forwarding. Kokon can also run without a window, on a Linux
+server or in Docker. Guide: [docs/remote-access.md](docs/remote-access.md).
+
+</details>
+
<details>
<summary><b>Does it work on AMD or Intel GPUs, on a Mac or on Linux?</b></summary>
<br>
@@ -702,8 +718,9 @@ or macOS version and the log from `KokonData/logs` (see the table above).
- [x] Your own LoRA files, per project (0.10.0, beta)
- [x] New images from reference photos (a person, a product, a style), with Prompt+ (0.10.2)
- [x] AMD GPUs through Vulkan (beta; RX 7900 XTX and RX 9060 XT reported working, RX 6000 cards still slow)
-- [ ] **0.11:** the interface in the browser, served by Kokon itself, on your local network with a password;
- then a Docker image for NVIDIA ([#15](https://github.com/GabrieleLozupone/kokon/issues/15))
+- [x] **0.11:** the interface in a browser on your other devices, served by Kokon itself, with a password,
+ and a Docker image for NVIDIA ([#15](https://github.com/GabrieleLozupone/kokon/issues/15))
+- [ ] Docker image for AMD and Intel (Vulkan); the desktop app as a client of a Kokon server elsewhere
- [ ] Intel GPUs through Vulkan (to verify)
- [ ] Background removal and transparent cutouts
- [ ] Batch edits: one instruction for a whole folder
diff --git a/docs/STATUS.md b/docs/STATUS.md
index f000381..95f3f42 100644
--- a/docs/STATUS.md
+++ b/docs/STATUS.md
@@ -9,11 +9,12 @@ Windows, macOS (Apple Silicon, 15+) and Linux (`.deb`, `.rpm`). Installed copies
## In progress: 0.11, Kokon as a server
-Tracked in [#15](https://github.com/GabrieleLozupone/kokon/issues/15); design in [linux.md](linux.md).
-- The browser UI, served by `kokon-service` itself.
-- Access from the local network: off by default, behind a password with a limit on attempts. For access from
- outside, a guide to Tailscale or another VPN, never direct exposure.
-- A Docker image for NVIDIA (CUDA) first; an AMD/Intel (Vulkan) image once it can be tested.
+Tracked in [#15](https://github.com/GabrieleLozupone/kokon/issues/15); design in [linux.md](linux.md). Built on the
+branch `server-0.11`, being tested before the release:
+- The browser UI, served by `kokon-service` itself (Settings → Other devices, or `kokon-service --remote`).
+- Access from the local network: off by default, behind a password (Argon2id hash) with a limit on attempts.
+ For access from outside, a guide to Tailscale or another VPN: [remote-access.md](remote-access.md).
+- A Docker image for NVIDIA (CUDA): [docker.md](docker.md). An AMD/Intel (Vulkan) image once it can be tested.
- Later: the desktop app as a client of a Kokon server elsewhere.
## Next
diff --git a/docs/docker.md b/docs/docker.md
new file mode 100644
index 0000000..8a13b2c
--- /dev/null
+++ b/docs/docker.md
@@ -0,0 +1,61 @@
+# Kokon in Docker (NVIDIA)
+
+The same Kokon as the Linux packages, without a window: you use it from a browser on any device.
+For NVIDIA graphics cards (CUDA). An image for AMD and Intel cards (Vulkan) will follow once it can
+be tested.
+
+## What you need
+
+- Linux with an NVIDIA card and the proprietary driver (`nvidia-smi` works). Windows works too through
+ Docker Desktop with WSL 2.
+- Docker with the Compose plugin, and the
+ [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).
+- About 15 GB of disk for the engine and the model.
+
+## Start it
+
+From a clone of this repository:
+
+```bash
+docker compose -f docker/compose.yaml up -d --build
+docker exec -it kokon kokon-service --set-password # once; at least 8 characters
+```
+
+Open `http://<this computer's address>:39152` in a browser, sign in, and follow the setup: it
+downloads the engine and the model (about 12 GB) into the container's data volume, once.
+
+## Where things are
+
+| Volume | Inside the container | What |
+|---|---|---|
+| `kokon-data` | `/data` | engine, models, gallery database, logs |
+| `kokon-config` | `/config` | settings |
+| `kokon-gallery` | `/gallery` | the images saved to the gallery |
+
+To keep the saved images in a folder of your own, replace the `kokon-gallery` line in
+`docker/compose.yaml` with a folder Kokon can write to (it runs as user id 1000):
+
+```bash
+mkdir -p ~/kokon-gallery && sudo chown 1000:1000 ~/kokon-gallery
+# - ~/kokon-gallery:/gallery
+```
+
+## Everyday use
+
+```bash
+docker logs -f kokon # what the service is doing
+docker exec -it kokon kokon-service --set-password # a new password (every browser signs in again)
+docker compose -f docker/compose.yaml down # stop (the volumes stay)
+git pull && docker compose -f docker/compose.yaml up -d --build # update to a new version
+```
+
+## Security
+
+- Nothing is reachable until a password is set. The password is stored as a hash, and 5 wrong tries
+ in a row make that device wait.
+- The port is published on every network interface. Docker's published ports bypass host firewalls
+ such as ufw; to use Kokon only from the computer itself, change the port line to
+ `"127.0.0.1:39152:39152"`.
+- The connection is plain HTTP: use it on your home network, and through Tailscale or another VPN from
+ anywhere else. Never forward the port on your router. See [remote-access.md](remote-access.md).
+- Kokon's local API with its token (used by scripts and the MCP server) stays inside the container.
diff --git a/docs/engineering-notes.md b/docs/engineering-notes.md
index 0513c5d..c0beb0c 100644
--- a/docs/engineering-notes.md
+++ b/docs/engineering-notes.md
@@ -33,7 +33,7 @@ Kokon.exe (Tauri 2 + React) kokon-mcp.exe (MCP, stdio) scripts
| `catalog.rs`, `installer.rs` | Pinned downloads (URLs, sizes, SHA-256), hardware presets, parallel resumable downloader |
| `config.rs` | Settings and model profiles: the official files (derived from folder + preset) and the user's own files, each recording its model and source |
| `modelfile.rs` | What a `.gguf` / `.safetensors` file is, read from its header only (role, Qwen-Image 2.1 or not, quantization, vision weights); folder scan for the user's own files |
-| `crates/qls-service` | Headless service and stable HTTP API; single instance; lifecycle |
+| `crates/qls-service` | Headless service and stable HTTP API; single instance; lifecycle. `remote.rs`: the embedded browser UI, password sign-in and the network listener (rules in `qls_core::remote`) |
| `src-tauri`, `src/` | Desktop shell (Rust) and UI (React + TypeScript); in-app updates in `src/lib/updates.ts` |
| `mcp/` | MCP server (TypeScript, official SDK) |
diff --git a/docs/linux.md b/docs/linux.md
index 4d924a0..490b441 100644
--- a/docs/linux.md
+++ b/docs/linux.md
@@ -102,4 +102,11 @@ Upstream moves fast. Every platform follows the same release, so:
Later
- [ ] Real-hardware reports: AMD on Linux (swingtempo R9700, alean200), a non-WSL NVIDIA machine.
- [ ] AppImage? Not planned (large, and deb/rpm cover the main distros).
-- [ ] Steps 2 and 3 of the plan above (0.11.0; design under review).
+- [x] Step 2 of the plan above (0.11.0, branch `server-0.11`): `kokon-service` serves the UI it embeds
+ (`crates/qls-service/src/remote.rs`); a second listener on all interfaces (`remote_port`, 39152) opens only
+ with access on and a password set, and refuses the token; rules and tests in `qls_core::remote`. Guides:
+ [remote-access.md](remote-access.md), [docker.md](docker.md).
+- [ ] Step 3 (the desktop app as a client). Decided 2026-10-23: when it comes, the app keeps two separate
+ galleries, "This computer" and the server's, with a button to save a server image locally; no automatic
+ sync (conflicts, duplicates, lost images). Away from home the server's gallery is reachable only through
+ Tailscale or another VPN.
diff --git a/docs/remote-access.md b/docs/remote-access.md
new file mode 100644
index 0000000..46b4a52
--- /dev/null
+++ b/docs/remote-access.md
@@ -0,0 +1,99 @@
+# Use Kokon from other devices
+
+Kokon can open its interface in a browser on your phone, tablet or another computer. The images are
+still made on the computer with the graphics card and saved in its gallery; the other device only
+shows the interface, uploads the photos you pick and downloads the results you save.
+
+It is off until you turn it on, and it always asks for a password.
+
+## On your home network
+
+1. On the computer running Kokon, open **Settings → Other devices**.
+2. Choose a password (at least 8 characters) and click **Set and turn on**.
+3. Settings shows an address such as `http://192.168.1.20:39152`. Open it in a browser on the other
+ device, on the same network, and enter the password. That browser stays signed in for 90 days.
+
+The first time, your system may ask whether to let Kokon on the network (Windows Defender Firewall,
+macOS). Allow it on **private** networks only.
+
+It works while Kokon is open on that computer. To keep it running without the window, use a headless
+server or Docker (below).
+
+**Changing the password** signs every browser out. **Remove** turns access off and deletes the
+password. Forgot it? Set a new one in the same place.
+
+### On a server without a screen (Linux)
+
+`kokon-service` comes with the Linux packages (`/usr/bin/kokon-service`). Set the password once, then
+start it with access on:
+
+```bash
+kokon-service --set-password # asks twice, nothing is shown while you type
+kokon-service --persistent --remote # keeps running; the browser UI is on port 39152
+```
+
+The first time, open the address in a browser and follow the setup to download the model. A password
+set while the service runs takes effect within a few seconds. For a container, see
+[docker.md](docker.md).
+
+## What is protected, and what is not
+
+- The password is stored only as a hash (Argon2id) in Kokon's data folder; it never appears in the
+ settings or the logs.
+- After 5 wrong passwords in a row, that device waits 1 minute, then longer after each new mistake
+ (up to 15 minutes). Other devices are not affected.
+- Nothing listens on the network until a password exists and access is on. Kokon's own token, used by
+ the desktop app and the MCP server, works only on the computer itself.
+- A browser can do what the interface does: create and edit, the gallery, Settings. It cannot read or
+ write files on the computer by path, change folders or model files, or turn network access on or
+ off. Those stay in the desktop app.
+- Web pages from other sites cannot use your signed-in session.
+
+**The connection is plain HTTP, not encrypted.** On your home Wi-Fi that is fine. On a shared network
+(office, university, café) someone on the same network could read the password and your images on the
+way. Use it only on networks you trust, or through Tailscale (below), which encrypts everything.
+
+## From outside your home: Tailscale
+
+Never open Kokon's port on your router (port forwarding): anyone on the internet could then try the
+password. Use a private network instead. [Tailscale](https://tailscale.com) is free for personal use
+and takes a few minutes:
+
+1. Install Tailscale on the computer running Kokon and on your phone or laptop, and sign in with the
+ same account on both.
+2. Turn on access in Kokon (above).
+3. On the other device, with Tailscale on, open `http://<computer name>:39152`. The computer name is
+ in the Tailscale app (for example `http://gaming-pc:39152`), or use its `100.x.y.z` address.
+
+Traffic between your devices is encrypted by Tailscale, wherever you are.
+
+**Optional, HTTPS:** with [MagicDNS and HTTPS](https://tailscale.com/kb/1153/enabling-https) turned
+on for your tailnet, run on the Kokon computer:
+
+```bash
+tailscale serve --bg 39152
+```
+
+Then open `https://<computer name>.<your tailnet>.ts.net`. With HTTPS the browser also lets Kokon copy
+images to the clipboard.
+
+Other private networks work the same way: WireGuard, ZeroTier, or your router's own VPN. Connect to
+your home network, then open the same address as at home.
+
+## What is different in a browser
+
+- **Adding photos:** the + button, dropping files on the page or pasting. They are uploaded to Kokon.
+- **Saving:** the download button saves the image on the device you are using.
+- **Copying an image** needs HTTPS (or the computer itself at `localhost`); on plain HTTP the button
+ is hidden.
+- Not available: show in folder, open the logs, LoRA and `.cube` files from disk, choosing model files
+ you already have, updates. Do those on the computer running Kokon; settings that name a folder show
+ its value there.
+
+## It does not connect
+
+- Check that both devices are on the same network (or both on Tailscale) and that **Settings → Other
+ devices** shows the address.
+- A firewall may block the port. Windows: allow Kokon on private networks (Windows Security →
+ Firewall → Allow an app). Linux with ufw: `sudo ufw allow from 192.168.0.0/16 to any port 39152`.
+- Another program may use port 39152: Settings shows the error; choose another port there.
diff --git a/marketing/release-notes-0.11.0.md b/marketing/release-notes-0.11.0.md
new file mode 100644
index 0000000..48e7a8b
--- /dev/null
+++ b/marketing/release-notes-0.11.0.md
@@ -0,0 +1,37 @@
+## Kokon 0.11.0
+
+Use Kokon from your phone, tablet or another computer, in a browser. The images are still made on the computer with the graphics card and saved in its gallery.
+
+- **Other devices** ([#15](https://github.com/GabrieleLozupone/kokon/issues/15)): open **Settings → Other devices**, choose a password and open the address it shows on any device on the same network. Each browser asks for the password once. It is off until you turn it on, and nothing listens on the network before a password exists.
+- **Safe by default**: the password is stored only as a hash, 5 wrong tries in a row make that device wait, and a browser can't touch files on the computer by path or change its folders, model files or network settings. Kokon's own token (desktop app, MCP server) still works only on the computer itself.
+- **From outside your home**: a short guide to [Tailscale](https://github.com/GabrieleLozupone/kokon/blob/master/docs/remote-access.md#from-outside-your-home-tailscale) (or another VPN). Never open Kokon's port on your router.
+- **In the browser**: add photos with the + button, by dropping files or by pasting; the download button saves results on the device you are using.
+- **Docker for NVIDIA cards**: Kokon without a window, with the models, settings and gallery in volumes and an example `docker compose` file. Guide: [docs/docker.md](https://github.com/GabrieleLozupone/kokon/blob/master/docs/docker.md). An image for AMD and Intel cards (Vulkan) will follow.
+- **Headless Linux**: `kokon-service --set-password`, then `kokon-service --persistent --remote`.
+- The MCP server finds the service on Linux too.
+
+**Updating from 0.10.2**: only the app updates; the engine and the models stay as they are. Your images and settings are kept, and access from other devices stays off until you turn it on.
+
+Full guide: [docs/remote-access.md](https://github.com/GabrieleLozupone/kokon/blob/master/docs/remote-access.md).
+
+### Installing on Linux
+
+```bash
+sudo apt install ./Kokon_0.11.0_amd64.deb # Ubuntu 22.04+, Debian 12+, Mint 21+
+sudo dnf install ./Kokon-0.11.0-1.x86_64.rpm # Fedora 40+
+```
+
+NVIDIA cards need the proprietary driver (the CUDA runtime comes with Kokon). AMD and Intel cards use Mesa's Vulkan driver.
+
+### Thanks
+
+- Everyone who asked for a browser interface and Docker in [#15](https://github.com/GabrieleLozupone/kokon/issues/15): @frostworx, @giveen, @Markus-, @openSourcerer9000, @pastukhvladyslav, @strid3r21 and @swingtempo.
+
+### Downloads
+
+| File | SHA-256 |
+|---|---|
+| `Kokon_0.11.0_x64-setup.exe` (Windows) | `TODO` |
+| `Kokon_0.11.0_aarch64.dmg` (Mac, macOS 15+) | `TODO` |
+| `Kokon_0.11.0_amd64.deb` (Ubuntu, Debian, Mint) | `TODO` |
+| `Kokon-0.11.0-1.x86_64.rpm` (Fedora) | `TODO` |