staqlydocs

Run the binary

Install staqly as one program and run the API, MCP endpoint and dashboard with a single command.

Edit on GitHub

The recommended way to run Staqly Community Edition on your own computer. One binary, staqly serve, starts the REST API, the MCP endpoint, the background workers and the dashboard — no Docker, no containers. Use the Docker image instead if you already run everything in Docker or want the hardened container setup.

Install and start

Install

curl -fsSL https://raw.githubusercontent.com/staqly/staqly/main/scripts/install.sh | sh

The script detects macOS or Linux (amd64, arm64), downloads the latest release, checks it against the release's checksums.txt and puts staqly in ~/.local/bin. If that folder isn't on your PATH, it prints the line to add. On Windows, download the .zip from the releases.

Start staqly

staqly serve

It prints where everything is, then the access token with a link that opens the dashboard signed in, and stays in the foreground. Stop it with Ctrl-C.

Staqly Community Edition (local mode): every request needs the access token.
  Open the dashboard:  http://localhost:8080/#token=stk_local_...
  Access token:        stk_local_...

The token is made on first start in the data folder (access_token, readable only by you) and stays the same at every start. staqly serve token prints it again.

Open the dashboard

Open the printed link. It signs this browser in once (or paste the token on the sign-in page of http://localhost:8080). Then connect an agent to http://localhost:3333/mcp with the token: export STAQLY_API_KEY=$(staqly serve token). The staqly CLI on this computer finds the token by itself.

staqly is also the CLI, so one install gives you both.

What runs where

WhatAddressReachable from
REST API + MCP127.0.0.1:3333 (MCP at /mcp)this computer only, with the access token
Dashboard127.0.0.1:8080this computer only; every browser signs in once
Data~/.local/share/staqlySQLite database (workspace.db), uploads/, access_token, secret.key, notify_secret.key

Options

staqly serve --data ~/staqly-data          # another data directory (or STAQLY_DATA_DIR)
staqly serve --port 4333 --dashboard-port 9090   # other ports for the API and the dashboard
staqly serve --expose                      # dashboard on all interfaces, for phones and tablets
FlagDefaultDescription
--data$STAQLY_DATA_DIR, else ~/.local/share/staqlyData directory. Created if missing.
--port3333API and MCP port. Always bound to 127.0.0.1.
--dashboard-port8080Dashboard port.
--exposeoffServe the dashboard on all interfaces instead of 127.0.0.1.

Every other setting comes from environment variables, for example LOG_LEVEL=debug staqly serve. The binary does not read a .env file.

Use it from your phone

With --expose, other devices on your network can open the dashboard. Every browser signs in once; a phone does it with a one-time link, so it never needs the access token:

staqly serve --expose
staqly serve connect-link    # in another terminal: prints a one-time sign-in link

Or scan the QR code from Connect a device in the dashboard: it uses your computer's Wi-Fi address by itself, even when you opened the dashboard at localhost. To pin another address or name for every browser, set PUBLIC_DASHBOARD_URL (e.g. PUBLIC_DASHBOARD_URL=http://192.168.1.23:8080 staqly serve --expose). Without --expose, the dialog tells you to restart with it. See Phones & tablets.

Operator commands

staqly serve followed by a command runs an operator command against the same data directory instead of starting the server:

staqly serve token                       # the access token, and a link that signs a browser in
staqly serve token --rotate              # a new access token; the old one stops, every browser is signed out
staqly serve connect-link                # one-time sign-in link for a browser
staqly serve backup ~/staqly-backup.db   # consistent database backup, works while staqly runs

Pass the same --data (and --dashboard-port) you start the server with.

Run it in the background

staqly service install runs staqly serve as a background service of your user, so staqly keeps running after you close the terminal, starts again with your computer and restarts if it stops. No root, no Docker.

staqly service install              # same flags as serve: --port, --dashboard-port, --data, --expose
staqly service status               # installed? running and answering on its port?
staqly service logs -f              # follow its log
staqly serve token                  # the access token and the sign-in link
staqly service uninstall            # stop and remove it (your data and log are kept)

install waits until staqly answers on its port and fails with a message instead if it does not start. It refuses ports another program already uses, for example the Docker container on 3333 and 8080: pick others with --port and --dashboard-port.

macOSLinux
Runs asLaunchAgent ~/Library/LaunchAgents/ai.staqly.serve.plistsystemd user unit ~/.config/systemd/user/staqly.service
Startsat loginat boot (lingering is turned on; if that needs root, run sudo loginctl enable-linger $USER)
Log~/Library/Logs/staqly/staqly.logjournalctl --user -u staqly

Settings from your environment when you install are kept in the service (STAQLY_*, PROVIDER_*, PUBLIC_*, LOG_*, NOTIFY_*, WEBHOOK_*...). For example, a fixed key for channel credentials:

STAQLY_SECRET_KEY="$(openssl rand -base64 32)" staqly service install

Run staqly service install again after an upgrade or to change flags or settings: it replaces the service. On Windows, start staqly serve from Task Scheduler.

Next steps

On this page