Skip to content

First Stack

This walkthrough starts a minimal FlowLayer server stack, then shows how to connect the official TUI with explicit session parameters.

Create a flowlayer.jsonc in your working directory:

{
"services": {
"echo": {
"cmd": ["sh", "-c", "while true; do echo flowlayer-up; sleep 2; done"]
}
}
}

This is intentionally server-only. No client configuration is required to run the stack.

The commands below use the downloadable server binary name flowlayer-server.

Terminal window
flowlayer-server -c ./flowlayer.jsonc

Expected behavior:

  • boot phase validates config and computes startup plan
  • start phase launches services
  • runtime phase waits for termination signal

Without a session bind, the Session API is not exposed.

To enable the Session API explicitly:

Terminal window
flowlayer-server -c ./flowlayer.jsonc -s 127.0.0.1:6999 -token dev-token

Activation sources are:

  • CLI flag -s
  • or server config field session.bind

If neither is set, there is no session HTTP API.

When session API is active, connect the official TUI with explicit address and token:

Terminal window
flowlayer-client-tui -addr 127.0.0.1:6999 -token dev-token

If you do not pass -token and the server auto-generates one, use the token printed by server boot logs.

Health endpoint (when session API is enabled):

Terminal window
curl -H "Authorization: Bearer dev-token" http://127.0.0.1:6999/health

Expected response:

{"ok": true}
  • If flowlayer-client-tui cannot connect, confirm -s bind and token values first.
  • If /health returns 401 or 403, check the Authorization: Bearer <token> header.

For role boundaries and configuration semantics, see Server & TUI Modes.