diff --git a/README.md b/README.md index 262ed1b8d8..8b77d18250 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Manage and run tasks in parallel. Orchestrate agents. Review changes. Ship value. -[Features](docs/features.md) | [Workflows](docs/workflow-tips.md) | [Run as a Service](docs/run-as-a-service.md) | [Debug Logs](docs/debug-logs.md) | [Roadmap](docs/roadmap.md) | [Contributing](CONTRIBUTING.md) | [Architecture](docs/ARCHITECTURE.md) | [Discord](https://discord.gg/gWdCPGcFCD) +[Features](docs/features.md) | [Workflows](docs/workflow-tips.md) | [Run as a Service](docs/run-as-a-service.md) | [Mobile Access](docs/public/mobile-remote-access.md) | [Debug Logs](docs/debug-logs.md) | [Roadmap](docs/roadmap.md) | [Contributing](CONTRIBUTING.md) | [Architecture](docs/ARCHITECTURE.md) | [Discord](https://discord.gg/gWdCPGcFCD)
@@ -17,7 +17,7 @@ Kandev is a powerful tool for power users who want deeper control over how AI ag
Organize work across kanban and pipeline views with opinionated workflows and execute multiple tasks in parallel. Assign agents from any provider, and review their output in an integrated workspace - file editor, file tree, terminal, browser preview, and git changes in one place. Terminal agent TUIs are great for running agents, but reviewing and iterating on changes there doesn't scale.
-Run it locally or self-host it on your own infrastructure and access it from anywhere via [Tailscale](https://tailscale.com/) or any VPN.
+Run it locally or self-host it on your own infrastructure. Use the [mobile remote-access guide](docs/public/mobile-remote-access.md) to connect through Tailscale, Cloudflare Tunnel, or another private VPN.
Open source, multi-provider, no telemetry, not tied to any cloud.
diff --git a/docs/public/coverage.json b/docs/public/coverage.json
index a96c0dc4ad..eb2e8ef85e 100644
--- a/docs/public/coverage.json
+++ b/docs/public/coverage.json
@@ -430,6 +430,7 @@
"stability": "stable",
"docs": [
"security",
+ "mobile-remote-access",
"configuration",
"executors",
"automation-and-mcp",
diff --git a/docs/public/meta.json b/docs/public/meta.json
index 2590a7f328..72d7820f30 100644
--- a/docs/public/meta.json
+++ b/docs/public/meta.json
@@ -25,6 +25,7 @@
"---Deploy and Operate---",
"docker",
"run-as-a-service",
+ "mobile-remote-access",
"windows-support",
"k8s",
"operations",
diff --git a/docs/public/mobile-remote-access.md b/docs/public/mobile-remote-access.md
new file mode 100644
index 0000000000..593e28054d
--- /dev/null
+++ b/docs/public/mobile-remote-access.md
@@ -0,0 +1,231 @@
+---
+title: "Mobile Remote Access"
+description: "Use Kandev from a phone through Tailscale, Cloudflare Tunnel, or a private VPN."
+---
+
+# Use Kandev from a Phone
+
+This how-to guide connects a phone to Kandev through Tailscale, Cloudflare Tunnel, or a private VPN.
+
+Anyone who can reach an unauthenticated Kandev origin has administrator access. Use a protected network boundary.
+
+## How a phone request reaches an agent
+
+Each protected path reaches the same Kandev origin. Kandev then sends task work to the selected executor.
+
+```mermaid
+flowchart LR
+ Phone["Phone browser"]
+ Tailscale["Tailscale Serve"]
+ Cloudflare["Cloudflare Access"]
+ Cloudflared["cloudflared"]
+ VPN["Private VPN"]
+ Kandev["Kandev
HTTP and WebSocket"]
+ Session["Task and agent session"]
+ Executor["Selected executor"]
+ Repo["Repository"]
+
+ Phone --> Tailscale --> Kandev
+ Phone --> Cloudflare --> Cloudflared --> Kandev
+ Phone --> VPN --> Kandev
+ Kandev --> Session --> Executor --> Repo
+```
+
+The access path protects the Kandev origin. Each path reaches the same Kandev web app and task features.
+Kandev authentication remains a separate user and workspace boundary.
+
+## Choose an access boundary
+
+Use one of these boundaries:
+
+| Use case | Network boundary | Kandev authentication |
+| --- | --- | --- |
+| One person, trusted phone and host | Private tailnet with a narrow Tailscale grant | Optional |
+| One person, another private VPN | Private VPN address plus host firewall | Optional |
+| One person, Cloudflare Tunnel | Cloudflare Access policy for one trusted identity | Optional |
+| Multiple people or less-trusted devices | Private network or authenticated TLS proxy | Required |
+| Public internet | Do not expose Kandev directly | Required behind a protected TLS proxy |
+
+When authentication is disabled, Kandev gives every reachable client one synthetic administrator identity.
+
+Enable [Authentication and Users](authentication.md) for accounts, private workspaces, sessions, or personal access tokens.
+
+## Connect with Tailscale
+
+This path keeps Kandev on loopback. Tailscale Serve provides the tailnet listener and HTTPS endpoint.
+
+1. [Install Tailscale](https://tailscale.com/docs/install) on the Kandev host and phone.
+2. Sign in to the same tailnet on both devices.
+3. If the tailnet does not use [MagicDNS](https://tailscale.com/docs/features/magicdns), enable it.
+4. Start Kandev on a fixed loopback port.
+
+```bash
+KANDEV_SERVER_HOST=127.0.0.1 KANDEV_BACKEND_PORT=38429 kandev
+```
+
+5. In another host terminal, publish that loopback service inside the tailnet.
+
+```bash
+tailscale serve --bg http://127.0.0.1:38429
+tailscale serve status
+```
+
+6. Open the HTTPS URL that `tailscale serve` prints on the phone.
+
+The URL uses the full MagicDNS name of the host, such as `https://kandev-host.example.ts.net`.
+
+[Tailscale Serve](https://tailscale.com/docs/reference/tailscale-cli/serve) terminates HTTPS and keeps the endpoint inside the tailnet. Do not use Tailscale Funnel because Funnel publishes the endpoint to the internet.
+
+If Kandev runs as a managed service, use the [service guide](run-as-a-service.md). Make sure that the backend port remains fixed before you keep a Serve rule.
+
+### Restrict the tailnet connection
+
+Tailscale recommends grants for new access-control policies. Legacy ACL rules continue to work.
+
+Tag the Kandev host as `tag:kandev`. Then add a grant like this to the tailnet policy:
+
+```json
+{
+ "tagOwners": {
+ "tag:kandev": ["you@example.com"]
+ },
+ "grants": [
+ {
+ "src": ["you@example.com"],
+ "dst": ["tag:kandev"],
+ "ip": ["tcp:443"]
+ }
+ ]
+}
+```
+
+Replace `you@example.com` with the identity that owns the phone. Keep other required rules in the same policy file.
+
+The grant permits only that identity to reach HTTPS on tagged Kandev hosts. Read the [Tailscale grants reference](https://tailscale.com/docs/reference/syntax/grants) before you replace an existing policy.
+
+## Connect with Cloudflare Tunnel
+
+Cloudflare Tunnel gives Kandev a public HTTPS hostname without a public origin address. The `cloudflared` connector makes an outbound connection from the Kandev host.
+
+The hostname is public unless Cloudflare Access protects it. Create the Access application before you add the tunnel route.
+
+### Protect the hostname with Cloudflare Access
+
+1. Add your domain to Cloudflare and create a Cloudflare Zero Trust organization.
+2. In the Cloudflare dashboard, go to **Zero Trust > Access controls > Applications**.
+3. Select **Create new application**.
+4. Select **Self-hosted and private**.
+5. Add a public hostname, such as `kandev.example.com`.
+6. Add an **Allow** policy for the identity that can use Kandev.
+7. Select the required identity provider or one-time PIN method.
+8. Create the application.
+
+Access denies requests that do not match an Allow policy. Read the [Cloudflare self-hosted application guide](https://developers.cloudflare.com/cloudflare-one/access-controls/applications/http-apps/self-hosted-public-app/) for policy details.
+
+For one trusted person, Cloudflare Access can be the external access boundary. If the policy allows multiple people, also enable [Kandev authentication](authentication.md).
+
+Cloudflare identities do not become Kandev accounts. Without Kandev authentication, all permitted Access users share the synthetic Kandev administrator.
+
+### Start Kandev on loopback
+
+Start Kandev on a fixed loopback port:
+
+```bash
+KANDEV_SERVER_HOST=127.0.0.1 KANDEV_BACKEND_PORT=38429 kandev
+```
+
+If Kandev runs as a service, configure the same loopback address and fixed port.
+
+Follow [Bind safely](run-as-a-service.md#bind-safely) and the [fixed-port workaround](run-as-a-service.md#fixed-port-operator-workaround).
+
+### Install and configure `cloudflared`
+
+1. In the Cloudflare dashboard, go to **Networking > Tunnels**.
+2. Create a tunnel and select the `cloudflared` connector.
+3. Select the operating system and architecture of the Kandev host.
+4. Copy the installation command that Cloudflare provides.
+5. Run the command on the Kandev host.
+
+The service command has this form:
+
+```bash
+sudo cloudflared service install First-run records and onboarding details
@@ -199,7 +199,7 @@ See [Sessions and review](sessions-and-review.md) for the workbench and [Tasks a
- Managed GitHub task access (the default) uses task/repository-bound broker leases from the workspace automation connection. GitHub App tokens are minted for the redeemed repository; PAT and named-CLI bearer tokens retain all provider-granted scopes once delivered to the trusted agent subprocess. Personal tokens and the App private key never enter executors. Choose **Inherit executor Git credentials** in the workspace GitHub settings only when task Git and `gh` should use host-visible credentials for Local/Worktree or intentionally configured credentials for remote executors.
- A profile-supplied `GITHUB_TOKEN` or `GH_TOKEN` is an explicit unmanaged override and bypasses workspace broker selection. Ambient backend tokens and the host-active `gh` account are used only by migration-only **Legacy shared** workspace connections.
- Repository, executor, and task action scripts are executable configuration. Review them like code.
-- The web app, HTTP API, WebSocket, and external MCP routes currently have no Kandev user-login boundary. Treat anyone who can reach the backend as an operator; keep the whole origin on loopback or a trusted network, or put it behind an authenticated TLS proxy.
+- Authentication is opt-in. When it is disabled, treat anyone who can reach the backend as an operator. Keep the whole origin on loopback or a trusted network, or put it behind an authenticated TLS proxy.
Use the [Security and trust](security.md) guide to choose a local, remote, shared-team, or unattended-automation boundary and to review the deployment checklist.
diff --git a/docs/run-as-a-service.md b/docs/run-as-a-service.md
index 29455daf66..190febb3a7 100644
--- a/docs/run-as-a-service.md
+++ b/docs/run-as-a-service.md
@@ -24,6 +24,8 @@ sudo kandev service install --system
After install, kandev is reachable at `http://localhost:38429` (or `--port