Bu teknik referans şu anda İngilizce olarak sürdürülüyor.

Docs/Using Flowly/Self-hosting
Using Flowly

Self-hosting

Run Flowly entirely on your own machine with your own LLM keys — a laptop, a Mac mini, or a headless VPS. Nothing here needs a Flowly account; this is the end-to-end walkthrough from install to a hardened background service.

Flowly runs entirely on your own machine with your own LLM keys. Nothing in this repo needs a Flowly account. This guide covers running it on a laptop, a Mac mini, or a headless VPS, and links to the deeper pages for each step.

For what's open-source vs. cloud-only, see Open source vs. Desktop & Cloud.

1. Install

# One command — sets up uv, Python, git, and a Flowly git checkout that
# `flowly update` keeps current with `git pull`
curl -fsSL https://useflowlyapp.com/install.sh | bash

The checkout and its virtualenv live under ~/.local/share/flowly/ (repo/ + venv/); everything Flowly stores lives under ~/.flowly/ (config, workspace, plugins, skills, memory, session db). See Installation and File layout.

2. Bring your own key

Pick any provider — OpenRouter, Anthropic, OpenAI, Gemini, Groq, xAI/Grok, Zhipu, Sakana, or any OpenAI-compatible local model (Ollama, LM Studio, vLLM). Those eight slugs are what setup byok accepts; subscription sign-ins (ChatGPT via Codex, Grok, GLM Coding Plan) have their own commands — see Providers and models:

flowly setup byok openrouter --key sk-or-...
flowly setup ollama --model gemma4                              # local Ollama, no API key
flowly setup local --api-base http://localhost:1234/v1 --model qwen3-8b  # LM Studio, vLLM, llama.cpp, ...
# or run the full wizard (provider + channels + tools)
flowly setup

ollama and local are both explicit-only: Flowly never auto-selects a local server just because one is configured — you opt in with --set-active (the default) or by picking it from /provider. local targets any other OpenAI-compatible server (LM Studio's default port is 1234, vLLM's is 8000); use ollama specifically for Ollama, which needs no --api-base.

This writes ~/.flowly/config.json. Keys there are camelCase:

{
  "providers": {
    "active": "openrouter",
    "openrouter": { "apiKey": "sk-or-..." }
  }
}

providers.active pins the default. Leave it "" and Flowly cascades through whatever you've configured so it always has a working model. See Providers & models.

3. Run it

Foreground (terminal):

flowly                 # terminal UI
flowly gateway         # just the gateway daemon, no TUI

As a background service (survives reboots and terminal close):

flowly service install --start     # launchd (macOS) / systemd (Linux) / Task Scheduler (Windows)
flowly service status
flowly service logs                # tail the logs
flowly restart
flowly service uninstall

The gateway listens on 127.0.0.1:18790 by default — loopback only, reachable only from the same machine. See Running as a service.

4. Headless / VPS

Run Flowly on a VPS or Mac mini and talk to it from Telegram, Discord, etc. — or from the desktop/mobile apps over the network.

# 1. Install + configure a provider (steps 1–2 above)
# 2. Initialize the workspace without prompts (good for scripts/cloud-init)
flowly bootstrap

# 3a. Local-only + a messaging channel (recommended, no open ports):
flowly setup channels          # add Telegram/Discord/Slack/…
flowly service install --start

# 3b. Expose the gateway to your devices (the desktop and phone apps):
flowly service install --start --remote
flowly enroll    # address, token and key, a link for the desktop, a code for the phone
If you bind to a non-loopback address, secure it:
  • The gateway encrypts connections from other machines with its own key (gateway.tls, auto by default; no domain or certificate authority needed). The apps pair with that key from the link or the code, check it on every connection, and refuse a gateway that shows another one: nothing in between can read the chat or the token, or pose as the gateway. Compare the key the app shows with the Key line flowly enroll prints.
  • Apps that predate this connect unencrypted while gateway.allowPlainRemote is true (the default for now). Once yours are updated, set it to false in config.json and restart: unencrypted connections from other machines are then refused.
  • Every client presents the token. A generated one (about 256 bits) cannot be guessed, and an address that keeps failing to sign in is refused for up to a minute. The token is kept in config.json only, never on the service's command line. Replace it with flowly service rotate-token (add --new-key for a new key as well); every app then pairs again.
  • Restrict the port with a firewall / security group to the addresses you connect from, or keep it off the internet entirely: an SSH tunnel, or a private network such as Tailscale or WireGuard.
  • The agent has shell and filesystem access on the host — treat gateway access as host access. See the repo's SECURITY.md.

Connecting your devices

flowly enroll (or /remote in the TUI, or flowly service install --remote) prints everything an app needs:

  • Address: the LAN address for a device on the same network, and the public address when it differs (at home that one needs a port forward on your router).
  • Port and Token.
  • Key: the first 16 hex digits of the gateway's key, such as 98C6 BFF6 4CE7 4227. The desktop app shows the same digits under Settings → Gateways once it is paired.
  • A flowly://remote?… link: paste it into a gateway's Address field in the desktop app (Settings → Gateways) and the form fills itself.
  • A code to scan with the iOS or Android app.

The link and the code carry the key, so an app paired from them is encrypted to it from its first connection. Typing the address and token by hand gives no key: the app then asks the gateway for it over its first, unencrypted connection and pins whatever answers. On a network you do not trust, pair from the link or the code instead.

An app paired before the gateway had a key does the same once it is updated: it learns the key on its next connection and is encrypted from then on.

When the key changes. The key is made once and kept, across restarts, renewed certificates and a new address. It changes only when you ask (flowly service rotate-token --new-key, flowly gateway --rotate-cert) or when ~/.flowly/gateway/tls/ is deleted. The apps then refuse the gateway and say its key changed; pair them again from the new code. If you did not change the key, something else is answering at that address: do not pair again.

Replacing the token. flowly service rotate-token stops the service if it is running, saves a new token, starts it again and prints the new link and code. The old token stops working at once, and every app pairs again. It also removes a token an older flowly service install put on the service's command line.

Windows. A gateway on Windows cannot yet encrypt: it serves other machines unencrypted and logs a warning when it starts. Reach it over a private network (Tailscale, WireGuard) or an SSH tunnel.

MCP management from a remote app

An updated gateway provides POST /api/mcp/manage for verified SSH-capable clients. Keep the gateway as a direct remote gateway; this does not require a relay or Firestore registration. The client connects through SSH to the remote loopback gateway port, then authenticates with the gateway token. The Flowly runtime does not receive or store your SSH password.

This is a separate management path: it does not publish an external-agent MCP URL or give the gateway a certificate other services trust. App support must also be present; updating only the runtime is not enough. Follow Remote MCP setup before connecting external services.

5. Sandbox

Shell/exec tooling runs inside an OS sandbox by default: sandbox-exec on macOS, bwrap (bubblewrap) on Linux. On Linux, install bubblewrap so the sandbox is active:

sudo apt install bubblewrap      # Debian/Ubuntu;  dnf install bubblewrap on Fedora

It denies access to things like ~/.ssh, ~/.aws, and keychains while allowing ~/.flowly, your home dir, and /tmp. You can disable it (not recommended) with:

FLOWLY_SANDBOX=0 flowly

Windows has no sandbox yet. Full details in Sandbox & approvals.

6. Profiles & isolation

Run multiple independent Flowly instances (e.g. a test bot and a real one) without sharing state:

flowly -p testbot setup        # named profile → ~/.flowly/profiles/testbot/
FLOWLY_HOME=/srv/flowly flowly gateway   # fully custom home dir
  • FLOWLY_HOME — override the whole state directory (default ~/.flowly).
  • FLOWLY_PROFILE / -p <name> — select a named profile under ~/.flowly/.
  • FLOWLY_SANDBOX=0 — disable the exec sandbox.

See Profiles and Environment variables.

7. Health check

flowly doctor          # diagnose config + runtime; --fix to auto-repair
flowly status

If something's off, flowly doctor is the first stop — it checks provider keys, the gateway, the service definition, and workspace layout. See Troubleshooting.