Skip to main content

Configuration Overview

IronClaw’s configuration is loaded with the following priority:

Database Configuration

IronClaw supports PostgreSQL and libSQL backends.

PostgreSQL

string
default:"postgres"
Database backend to use (postgres or libsql)
string
required
PostgreSQL connection URL
Examples:
  • Local: postgres://localhost/ironclaw
  • Neon: postgres://user:pass@ep-cool-darkness-123456.us-east-2.aws.neon.tech/ironclaw?sslmode=require
  • Supabase: postgres://postgres:pass@db.projectid.supabase.co:5432/postgres
integer
default:"10"
Maximum number of database connections in the pool
string
default:"prefer"
SSL/TLS mode for PostgreSQL connections
  • disable — No TLS (local development only)
  • prefer — Try TLS, fall back to plaintext (default)
  • require — Require TLS or fail
PostgreSQL 15+ and pgvector are required. See Installation → PostgreSQL Setup.

libSQL (Embedded SQLite)

string
default:"~/.ironclaw/ironclaw.db"
Path to the local libSQL database file
string
Turso cloud URL for remote replica sync (optional)
string
Turso authentication token (required if LIBSQL_URL is set)
libSQL is perfect for local development and single-user deployments. No external database server required.

LLM Provider Configuration

NEAR AI (Default)

NEAR AI provides multi-model access via a single account.
string
default:"nearai"
Set to nearai to use NEAR AI
string
default:"zai-org/GLM-latest"
Model to use for inferencePopular options:
  • zai-org/GLM-latest — Fast, default
  • anthropic::claude-sonnet-4-20250514 — Best quality
  • openai::gpt-5.3-codex — Flagship coding model
string
default:"https://private.near.ai"
NEAR AI API base URL
string
default:"https://private.near.ai"
NEAR AI authentication URL
string
Session token from browser OAuth (auto-generated by setup wizard)Stored in ~/.ironclaw/session.json by default.
string
API key from cloud.near.ai (alternative to session token)If set, the base URL defaults to https://cloud-api.near.ai.
The setup wizard handles NEAR AI authentication automatically via browser OAuth.

Anthropic (Claude)

string
Set to anthropic to use Anthropic’s API
string
required
Your Anthropic API keyGet one from: https://console.anthropic.com/settings/keys
string
default:"claude-sonnet-4-20250514"
Claude model to useOptions:
  • claude-sonnet-4-20250514 — Latest Sonnet (recommended)
  • claude-opus-4-20250514 — Most capable
  • claude-3-5-sonnet-20241022 — Previous generation

OpenAI

string
Set to openai to use OpenAI’s API
string
required
Your OpenAI API keyGet one from: https://platform.openai.com/api-keys
string
default:"gpt-4"
OpenAI model to useOptions:
  • gpt-5.3-codex — Latest flagship
  • gpt-5.2 — General purpose
  • gpt-4o — Multimodal
  • gpt-4-turbo — Fast and capable

Ollama (Local Models)

string
Set to ollama to use local Ollama models
string
default:"http://localhost:11434"
Ollama server URL
string
default:"llama3.2"
Ollama model to useMust be pulled first: ollama pull llama3.2
Ollama runs models locally on your machine. No API key required. See ollama.ai for installation.

OpenRouter (200+ Models)

string
Set to openai_compatible for OpenRouter
string
Set to https://openrouter.ai/api/v1
string
required
Your OpenRouter API keyGet one from: https://openrouter.ai/settings/keys
string
Model ID from OpenRouterExamples:
  • anthropic/claude-sonnet-4
  • openai/gpt-5.3-codex
  • google/gemini-pro-1.5
  • meta-llama/llama-3.3-70b-instruct
See openrouter.ai/models for the full list.
string
Custom HTTP headers (comma-separated key:value pairs)

OpenAI-Compatible (vLLM, LiteLLM, Together, Fireworks)

string
Set to openai_compatible
string
required
Base URL of the OpenAI-compatible endpointExamples:
  • vLLM: http://localhost:8000/v1
  • LM Studio: http://localhost:1234/v1
  • Together AI: https://api.together.xyz/v1
  • Fireworks AI: https://api.fireworks.ai/inference/v1
string
API key (optional for local servers)
string
required
Model identifierExamples:
  • meta-llama/Llama-3.3-70B-Instruct-Turbo (Together AI)
  • accounts/fireworks/models/llama4-maverick-instruct-basic (Fireworks)
  • llama-3.2-3b-instruct-q4_K_M (LM Studio)

Embeddings Configuration

Embeddings enable semantic search across your workspace.
boolean
default:"true"
Enable vector embeddings for semantic search
string
default:"nearai"
Embeddings provider (nearai, openai, or same as LLM_BACKEND)
string
Model to use for embeddings
  • NEAR AI: text-embedding-3-small (default)
  • OpenAI: text-embedding-3-small, text-embedding-3-large
Embeddings require PostgreSQL with pgvector or libSQL with vector support.

Secrets Configuration

Secrets (API keys, tokens) are encrypted with a master key.
string
Master encryption key (256-bit hex string)Generated by the setup wizard and stored in OS keychain or environment.
Keep your master key secure! If lost, encrypted secrets cannot be recovered.

Agent Configuration

string
default:"ironclaw"
Agent display name
integer
default:"5"
Maximum number of concurrent jobs
integer
default:"3600"
Job timeout in seconds (default: 1 hour)
integer
default:"300"
Time before marking a job as stuck (default: 5 minutes)
boolean
default:"true"
Enable planning phase before tool executionWhen enabled, the agent plans its approach before executing tools, improving accuracy.

Channel Configuration

HTTP Webhook Server

string
default:"0.0.0.0"
Host to bind the HTTP server to
integer
default:"8080"
Port for the HTTP webhook server
string
Secret for authenticating webhook requests

Telegram Bot

string
Telegram bot token from @BotFather
After setting the token, send /start to your bot in Telegram to pair.

Signal Messaging

string
default:"http://127.0.0.1:8080"
signal-cli daemon HTTP URL
string
Your Signal phone number (e.g., +1234567890)
string
Comma-separated list of allowed senders (* for all)
string
default:"pairing"
DM policy: open, allowlist, or pairing
Signal requires a running signal-cli daemon. See Signal Setup.

Slack Bot (WASM Channel)

string
Slack bot token (xoxb-...)
string
Slack app-level token (xapp-...)
string
Slack request signing secret

Safety Configuration

integer
default:"100000"
Maximum tool output length (characters)
boolean
default:"true"
Enable prompt injection detection

Heartbeat Configuration

The heartbeat system runs background tasks on a schedule.
boolean
default:"false"
Enable background heartbeat tasks
integer
default:"1800"
Heartbeat interval in seconds (default: 30 minutes)
string
default:"cli"
Channel to send heartbeat notifications to
string
default:"default"
User ID to notify
Heartbeat reads HEARTBEAT.md from your workspace and reports findings on the schedule.

Memory Hygiene Configuration

Automatic cleanup of stale workspace documents.
boolean
default:"true"
Enable automatic cleanup of old daily notes
integer
default:"30"
Delete daily/ documents older than this many days
integer
default:"12"
Minimum hours between cleanup passes
Identity files (IDENTITY.md, SOUL.md) are never deleted.

Docker Sandbox Configuration

string
default:"disabled"
Docker sandbox mode: disabled, enabled
string
default:"ironclaw-sandbox:latest"
Docker image for sandbox execution
integer
default:"300"
Sandbox execution timeout (default: 5 minutes)

Logging Configuration

string
default:"ironclaw=info"
Logging level and filtersExamples:

Configuration Files Reference

~/.ironclaw/.env

Bootstrap environment variables (database URL, LLM backend)Written by the setup wizard. Loaded on startup.

~/.ironclaw/config.toml

Structured TOML configuration (optional)Overrides database settings, overridden by environment variables.

~/.ironclaw/session.json

NEAR AI session token (auto-generated)Created during OAuth flow. Do not edit manually.

Database settings table

Persistent settings stored in the databaseLowest priority. Managed via the wizard or API.

Next Steps

Tools & Extensions

Explore built-in tools and install extensions

Channels

Configure Telegram, HTTP webhooks, and more

CLI Reference

Explore all available commands

Development

Build custom tools and contribute to IronClaw