Configuration, annotated
Every key in config.toml, what it switches on, and the one choice that moved to Settings.
You’ve built Pipal and opened your first chat. Now you want it to use your model key, or you want Developer to work in a project. If you start Pipal from the checkout with the default config path, open or create config.toml beside package.json.
In this chapter
- Choose the file Pipal reads and tell where its relative paths lead.
- Set the listener, browser origin, sign-in mode, and model credentials.
- Set turn and time limits and see when an existing chat picks up changes.
- Enable an extension, configure a project destination, and find where the owner chooses where work runs.
Start with the defaults and change one table
[server]
host = "127.0.0.1"
port = 8080
origin = "http://localhost:8080"
auth = "passkey"
[storage]
data_dir = "./data"
[profiles]
dir = "./agents"
[runtime]
max_concurrent_runs = 2
# max_turns = 50
run_timeout_ms = 120000
worker_max_turns = 100
worker_timeout_ms = 1200000
# openai_model = "gpt-4.1-mini"
# deepseek_model = "deepseek-flash"
[extensions]
enabled = [
"pipal.delegate", "pipal.system-diagnostics",
"pipal.web-artifacts", "pipal.coding", "pipal.bash",
]
# coding_root = "./my-project"
# workspace_root = "./workspace"
[extensions.modules]
"example.clock" = "./examples/tools/clock.mjs"
[extensions.project_shell]
image = "node:22-bookworm"
volume = "pipal-project"
allow_git_clone = false
- Listener and sign-in
The host and port are where Node listens. The origin is what the browser uses. This example uses localhost for passkeys.
- Private state
Relative to the directory containing this file. Keep it outside the web build.
- Agent profiles
The server reads the Markdown profiles from this directory at startup.
- Budgets and models
Times are in milliseconds. Model IDs are optional. Supply the matching key to the server before enabling a model. IDs must exist in the pinned Pi AI catalog.
- Chat turn cap
Leave this commented for 50 tool rounds in top-level Developer chats and 20 in other chats and foreground specialists. Uncommenting sets the same runtime ceiling for all of them. A profile can set a lower cap.
- Worker turn cap
An independent worker gets this separate cap, lowered by its profile when applicable. Pipal saves the cap when it creates the worker conversation.
- Host allowlist
These are the five default entries. Writing out the list makes the Docker destination below eligible for use. To turn on a read root, also add its extension name to this list.
- Module paths
Quotes keep the dotted extension name together as one key. The path is registered here. Add the name to the allowlist and grant it to a profile to use its tool.
- Docker backend
The engine needs a local Linux image and a writable plain local volume. Choose this table or the SSH recipe below. Pipal rejects a file with both.
host = "127.0.0.1"
port = 8080
origin = "http://localhost:8080"
auth = "passkey"
data_dir = "./data"
dir = "./agents"
max_concurrent_runs = 2
run_timeout_ms = 120000
worker_timeout_ms = 1200000
# openai_model = "gpt-4.1-mini"
# deepseek_model = "deepseek-flash"
enabled = [
"pipal.delegate", "pipal.system-diagnostics",
"pipal.web-artifacts", "pipal.coding", "pipal.bash",
]
# coding_root = "./my-project"
# workspace_root = "./workspace"
"example.clock" = "./examples/tools/clock.mjs"
image = "node:22-bookworm"
volume = "pipal-project"
allow_git_clone = false
1 Listener and sign-in
The host and port are where Node listens. The origin is what the browser uses. This example uses localhost for passkeys.
The file uses TOMLA configuration file format that groups named settings into tables such as [server].. A line such as [storage] opens a table, and the lines beneath it belong to that table until the next heading. A line starting with # is a comment. The figure spells out settings you can normally leave out, so you can see where to put an override. config.example.toml
Pipal looks for config.toml in the directory where the process starts. If that file is absent, it uses the defaults. To keep a separate configuration elsewhere, set PIPAL_CONFIG as an environment variableA named value supplied to a process when it starts, separate from its configuration file., a value passed to the process at startup. Once you name a file explicitly, it must exist. Relative data, profile, read-root, module, and SSH config paths start at the selected file’s directory. A relative PIPAL_CONFIG itself is resolved from the process’s working directory. config.ts
- Files on disk
- Loader config.ts
- Host main.ts
Host → Loader · loadConfig()
Start with the configuration
The host asks the loader for settings before it opens the web build or starts the runtime.
Loader → Files on disk · Read TOML
Find the file
Use
PIPAL_CONFIGif set. Otherwise readconfig.tomlfrom the working directory.Files on disk → Loader · Text
Read the contents
Only an absent default file is treated as empty. A named file that cannot be read stops startup.
Loader → Loader · Check shape
Validate keys and values
Check names, types and bounds. A typo such as
runtime.max_trunsstops startup.Loader → Loader · Apply rules
Resolve paths and check the extension list
Check the origin and backend combinations. Translate the legacy shell alias and warn when a Docker table lacks an explicit tool grant.
Loader → Host · Settings
Return the validated settings
The loader returns resolved paths and the host extension list.
Host → Host · Open runtime
Load profiles and extensions
The host checks the web build, then loads profiles and enabled modules as part of opening the runtime.
Host → Files on disk · Read workspace settings
Load the owner’s saved choices
loadWorkspaceLocations()readsworkspace-settings.jsonor decides the initial choices if the file is missing.Host → Host · Probe locations
Check enabled locations before resuming work
A failed probe leaves the location selected. See its error and retry in Settings → Workspace.
Host → Files on disk · Save initial choices
Write preferences on first start
The host saves new preferences before the harness opens.
Host → Loader
Start with the configuration
The host asks the loader for settings before it opens the web build or starts the runtime.
A typo in a setting can change what you think you’re running. Pipal stops on malformed TOML, unknown keys, and values outside the schema, the rules defining what the file accepts. The schema also checks inside subtables. To start, the host also needs a usable web build and a readable profile directory. host.test.ts main.ts
Listener, storage, profiles, and runtime
An origin is the scheme, hostname, and port at the start of a browser address. A build can live at https://home.example.com/ai/, while the origin remains https://home.example.com. Keep the listener on the host and set the public origin when you put a proxy in front. Deploying Pipal shows how the browser URL reaches the listener. config.ts
| Key | Type | Default | Accepted values and effect |
|---|---|---|---|
server.host |
String | 127.0.0.1 |
127.0.0.1 or ::1. Listen on IPv4 or IPv6 loopback. |
server.port |
Integer | 8080 |
1–65535. TCP port on that address. |
server.origin |
URL string | HTTP URL of the listener | Use HTTPS, or HTTP with localhost, 127.0.0.1, or [::1]. Supply the origin alone, without credentials, a query, a fragment, or a path prefix. Pipal checks the parsed URL and stores its normalized origin for browser write checks and passkeys. |
server.auth |
String | token |
token or passkey. For passkeys use HTTP at localhost or HTTPS with a hostname. IP literals and names ending in a dot are rejected. |
storage.data_dir |
Path string | ./data |
Private data directoryThe private folder on the host where Pipal keeps conversations, uploads, sign-in records, and other state.. Keep it outside the built web files. |
profiles.dir |
Path string | ./agents |
Directory of agent profiles. |
The core runtime explains tool roundsA model response that requests tools, together with the tool calls it requested.. Workers follows the separate assignment budget.
Key in [runtime] |
Type | Default | Accepted values and effect |
|---|---|---|---|
max_concurrent_runs |
Integer | 2 | 1–16. Admission limit for root runs. A foreground specialist shares its parent’s slot, and a run waiting for your approval does not count. The same setting caps active workers separately. |
max_turns |
Integer | 50 for top-level Developer chats, 20 for other top-level chats and foreground specialists | 1–100 tool rounds. An explicit value replaces both defaults. A lower profile cap still applies. |
run_timeout_ms |
Integer | 120,000 ms | 1,000–3,600,000 ms. Shared time budget for a root run and its foreground specialists. Approval waits and bounded workspace commands have separate timing. A live reply can get one finishing window of up to 90 seconds. |
worker_max_turns |
Integer | 100 | 1–500 tool rounds. Pipal saves the lower of this value and any profile cap when it creates the worker conversation. |
worker_timeout_ms |
Integer | 1,200,000 ms | 1,000–3,600,000 ms. Worker assignment time budget, with separate timing for approvals and bounded workspace commands. |
openai_model |
Nonblank string | Unset | Pi AI OpenAI catalog ID. Requires OPENAI_API_KEY and takes the place of the ChatGPT connection. |
deepseek_model |
Nonblank string | Unset | Pi AI DeepSeek catalog ID such as deepseek-flash. Requires DEEPSEEK_API_KEY. Can be used alongside either OpenAI mode. |
Deep diveWhen a saved chat picks up a new limit
After changing TOML, restart Pipal. To use a new turn cap in a saved top-level chat, reapply its profile as shown in Profiles and models. A send or Resume refreshes the current grants and starts a new deadline but uses the saved cap. For an existing worker, continue_worker sets a deadline from the current worker timeout and uses the cap already saved on the worker conversation. index.ts workers.ts
Extensions and their backends
The host list makes optional extensions available. Profiles grant them to chats, and project tools also need a matching workspace. Tools and extensions follows these checks. profiles.ts index.ts
The operator describes the SSH machine or Docker destination in TOML. The owner enables a project locationThe place a chat uses for project tools, either the Pipal host, an account reached over SSH, or a Docker project. in Settings → Workspace and chooses the default for new chats. This machine needs no destination table. If you enable it, approved commands run as the Pipal service user and can access the chat database and saved model login. Three ways to touch a project compares the options. workspace-locations.ts DeveloperWorkspace.svelte
| Key | Type | Default | Accepted values and effect |
|---|---|---|---|
extensions.enabled |
Array of nonblank strings | pipal.delegate, pipal.system-diagnostics, pipal.web-artifacts, pipal.coding, pipal.bash |
Unique names after trimming. Replaces the entire list when present. |
extensions.modules |
Name-to-path table | Empty | Maps nonblank custom names to local module paths. Names and paths are trimmed. Only enabled modules load. Built-in names are reserved. |
extensions.workspace_root |
Path string | Unset | Required with pipal.workspace. Dedicated read-only text root. |
extensions.coding_root |
Path string | Unset | Required with pipal.project-read. Host project directory for reading and search. |
extensions.project_shell |
Table | Unset | Docker backend. Needs an explicit extensions.enabled list granting pipal.coding or pipal.bash. |
extensions.development_workspace |
Table | Unset | SSH backend. Uses the default project tools above, or the project tools in your explicit list. Mutually exclusive with project_shell. |
Pipal saves the enabled locations, default location and Start new chats in YOLO mode preference in workspace-settings.json in the data directory. Every location starts off on a fresh installation, and new workspace chats ask for approval by default. If durable.sqlite already exists and the settings file is absent, loadWorkspaceLocations() enables the configured SSH or Docker destination if the host list grants its tools. workspace-locations.ts DeveloperWorkspace.svelte
Deep diveThe accepted names and paths inside each backend
Key in [extensions.project_shell] |
Type | Default | Accepted values and effect |
|---|---|---|---|
image |
String | Required | 1–255 characters. Starts alphanumeric. Then letters, digits, or ._/:@-. Image to use on the Docker engine. |
volume |
String | Required | 2–128 characters. Starts alphanumeric. Then letters, digits, or _.-. Volume mounted into the project container. |
allow_git_clone |
Boolean | false |
Adds the networked Git clone tool when pipal.bash is enabled. |
Key in [extensions.development_workspace] |
Type | Default | Accepted values and effect |
|---|---|---|---|
host |
String | Required | SSH destination or alias. Starts alphanumeric. Then letters, digits, or .:-. |
user |
String | pipal-dev |
Starts with lowercase ASCII letter or underscore. Then lowercase letters, digits, underscores, or hyphens. |
ssh_config |
Path string | Unset | Local file passed to SSH with -F. |
projects_root |
Path string | Unset | Canonical absolute Linux directory on the development machine. Pipal lists its direct project directories and creates new named folders there. Required if no projects are given. |
projects |
Name-to-path table | Unset | At least one entry if present. Names are 1–64 ASCII letters, digits, spaces, underscores, or hyphens, starting alphanumeric and ending without a space. Values are distinct canonical absolute Linux directories. |
Canonical here means the Linux path already has its normalized spelling, with no redundant separators, trailing slash on a non-root directory, dot segments, or NUL bytes. Without projects_root, Pipal uses .pipal-projects inside the first named project for new names. With it, new folders go directly beneath that root. Named project paths must differ from one another. The loader allows projects_root itself to match one of them. The SSH probe’s inspect operation checks that the configured paths resolve to real, writable directories and that /bin/bash is executable. config.ts contracts.ts development-workspace.ts development-runner.mjs
Deep diveWhich extension settings stop startup and which warn
Schema checks happen before extensions are normalized. Exact duplicate list entries fail the schema. Entries that become duplicates after trimming fail the next check. Pipal recognizes pipal.project-shell as a legacy spelling of pipal.bash and collapses aliases after that check. The legacy pipal.powershell name is ignored with a warning that points to pipal.coding, pipal.bash, and Developer workspace settings. Other recognized names include codemode, pipal.web-search, and pipal.public-web. An unknown enabled name needs a matching module path. An unused module path is never imported, though reserved names are forbidden even there. config.ts contracts.ts
loadConfig() accepts Bash and coding with no destination table. A Docker stanza without an explicit grant for either tool warns and is ignored, even when the default list contains both. An SSH stanza is unused if an explicit list leaves out both tools, although its settings are still validated. A missing required read root, both backend tables present, or a custom module replacing a built-in stops startup. config.ts
loadWorkspaceLocations() also rejects a profile granted both pipal.coding and pipal.project-read and refuses invalid saved workspace settings. It saves preferences by renaming a temporary file written with mode 0600. If an enabled destination fails its startup probe, Pipal logs the reason and keeps the location selected but unavailable. A failed probe when enabling a new location leaves the saved choices in place. After fixing a connection failure for an enabled location, use Retry connection in Settings. Restart Pipal to load TOML changes. A chat keeps the location and project pinned at creation. To change either, start a new chat. workspace-locations.ts DeveloperWorkspace.svelte index.ts
When pipal.public-web is enabled, main.ts installs publicWebExtension. The host contacts Exa or Jina Reader when a granted tool runs. A lookup can therefore fail in an otherwise healthy chat if the service is unreachable or its rate limit has been reached. main.ts public-web.ts
Keys belong in the server environment
| Variable | What reads it and why |
|---|---|
PIPAL_CONFIG |
Config loader. Selects the TOML file. |
OPENAI_API_KEY, DEEPSEEK_API_KEY |
Model registry. Credentials for the corresponding configured API-key models. |
PIPAL_PASSKEY_RECOVERY |
Startup. Exactly 1 requests recovery mode. It requires passkey authentication and an already enrolled passkey. |
PI_OAUTH_CALLBACK_HOST |
ChatGPT login. A nonempty value other than 127.0.0.1 blocks login. |
NODE_COMPILE_CACHE |
Node. Supplies an operator-managed compile cache directory. A nonempty value skips Pipal’s automatic cache setup. |
NODE_DISABLE_COMPILE_CACHE |
Any value, including an empty string, skips Pipal’s automatic setup. The Linux deployment guide uses 1 to disable Node’s cache for the systemd service. |
SystemRoot |
Windows diagnostics. Locates Windows executables and supplies SystemRoot and WINDIR to diagnostic commands. |
PATH |
Coding search. Passed to the ripgrep runner, with /usr/bin:/bin as fallback when unset. |
PIPAL_TEST_SINK names the receiver used by the recovery test, and PIPAL_TEST_DEVELOPMENT_CONFIG selects the optional live development test configuration. In the supplied deployment, the unit sets NODE_ENV=production and the Docker CLI consumes DOCKER_HOST. Vite’s import.meta.env.BASE_URL is a build value set with --base. recovery-worker.ts development-workspace.test.ts deployment.md pipal.service api.ts
The UI extension installer passes the inherited environment to Git with its own protocol and lazy-fetch settings. The test launchers also inherit the environment when adding fixture values. Those uses pass values through to subprocesses. ui-extension.mjs recovery.test.ts
Opt in to public documentation lookup
Add the web grants you want to extensions.enabled and restart Pipal. The example keeps all five default extensions. Chat and Developer request pipal.web-search for compatible models. Developer also requests pipal.public-web for keyless Exa search and Jina Reader. Custom profiles can request either grant in optional_extensions. config.example.toml developer.md
[extensions]enabled = [ "pipal.delegate", "pipal.system-diagnostics", "pipal.web-artifacts", "pipal.coding", "pipal.bash", "pipal.web-search", "pipal.public-web",]Four small configurations
Each illustration is a separate file. In an existing configuration, edit the corresponding keys in place so you keep your storage and sign-in settings. When switching backends, remove the previous backend table before adding the new one. In a default checkout these examples leave the profile and storage paths at their defaults. The project examples assume the engine or SSH destination has been prepared. A valid config can name a resource that still needs to be created. config.ts
OpenAI API-key model. Supply OPENAI_API_KEY to the server, then select the configured model from the composer. server.md
[runtime]openai_model = "gpt-4.1-mini"Passkeys on this computer. Open http://localhost:8080 so the browser uses the configured hostname. The Hono server follows enrollment. config.ts
[server]origin = "http://localhost:8080"auth = "passkey"Docker project. This list makes coding and Bash available to Developer. On a fresh setup, enable Docker in Settings → Workspace and save to probe the destination. Include the other default names to keep their capabilities. The Docker project explains the image and volume requirements. config.ts workspace-locations.ts
[extensions]enabled = ["pipal.coding", "pipal.bash"]
[extensions.project_shell]image = "node:22-bookworm"volume = "pipal-project"SSH machine. This uses the default project tool entries and assumes development is the destination in development.ssh. After loading the file, enable SSH machine in Settings → Workspace on a fresh setup. The development workspace follows that connection. config.ts workspace-locations.ts
[extensions.development_workspace]
host = "development"
ssh_config = "./development.ssh"
projects_root = "/home/pipal-dev/projects"
- SSH destination
SSH looks up the alias in the local file. With no user specified here, Pipal uses
pipal-dev. - Remote project parent
This is an absolute directory on Linux. New project names become directories beneath it.
[extensions.development_workspace]
1 SSH destination
SSH looks up the alias in the local file. With no user specified here, Pipal uses pipal-dev.
Your local configuration is ready to read. How do you keep the same workspace running on a server where your phone can reach it? Deploying Pipal puts the host behind HTTPS.
Recap
- Relative local paths start beside the selected TOML file. An explicitly selected missing file stops startup.
- The listener, browser origin, and sign-in mode serve different jobs. Model keys go in the server environment.
- A saved chat keeps its turn cap until you reapply its profile. Its instructions and extension selection refresh on admission.
- An explicit extension list replaces the defaults. TOML describes the SSH or Docker destination, and Settings controls which locations can run.
- PIPAL_CONFIG selects /etc/pipal/config.toml and data_dir is ./data. Where does Pipal look for state?
- In /etc/pipal/data
- In the checkout’s data folder
- Beside the Node executable
Answer and explanation
In /etc/pipal/data
Local relative setting paths start at the directory containing the selected file.
- You uncomment max_turns, set it to 30, and restart. What caps do Chat and Developer get in new conversations with the bundled profiles?
- Developer gets 50 while Chat gets 20
- Both save a cap of 30
- Both save a cap of 100
Answer and explanation
Both save a cap of 30
An explicit runtime.max_turns replaces the split defaults. Neither bundled profile sets a lower cap.
- You set enabled to ["pipal.web-search"]. Why did Chat stop delegating?
- Hosted search requires a different port
- The worker timeout is too short
- The explicit list omitted pipal.delegate
Answer and explanation
The explicit list omitted pipal.delegate
An explicit list is the whole host allowlist. Include the defaults you still want to use.
PIPAL_CONFIG selects /etc/pipal/config.toml and data_dir is ./data. Where does Pipal look for state?
You uncomment max_turns, set it to 30, and restart. What caps do Chat and Developer get in new conversations with the bundled profiles?
You set enabled to ["pipal.web-search"]. Why did Chat stop delegating?