Overview
Theironclaw doctor command runs comprehensive diagnostic checks to validate your IronClaw installation. It actively probes external dependencies, tests database connectivity, and verifies configuration to surface issues before they cause problems during operation.
Unlike
ironclaw status which provides passive status information, doctor performs active tests including network calls and binary checks.Usage
Output
Diagnostic Checks
NEAR AI Session
Validates authentication with NEAR AI:- Pass: Session file exists and is readable
- Fail: Session file missing or empty
Database Backend
Tests database connectivity:- PostgreSQL: Attempts connection and executes
SELECT 1 - libSQL: Checks if database file exists or can be created
Workspace Directory
Verifies the workspace directory exists or can be created: Pass output:Docker
Checks if Docker is installed and running: Pass output:Docker is required for sandboxed code execution. If you don’t need code execution, it’s safe to skip this check.
cloudflared
Checks for Cloudflare Tunnel CLI: Pass output:cloudflared is only needed if you want to expose your agent to the internet via Cloudflare Tunnels.ngrok
Checks for ngrok tunnel client: Pass output:tailscale
Checks for Tailscale VPN client: Pass output:Exit Codes
Thedoctor command always exits with code 0, even if some checks fail. This is intentional — not all checks are required for every use case.
- Missing tunnel tools (
cloudflared,ngrok,tailscale) are expected if you don’t need remote access - Missing Docker is acceptable if you don’t use code execution
Check Results
Three possible outcomes for each check:Pass
Fail
Skip
Examples
First-time setup validation
After runningironclaw onboard, verify everything is configured:
Troubleshooting
If the agent isn’t starting:[FAIL] results and address them.
Pre-deployment check
Before deploying to production:CI/CD pipeline
Add to your CI/CD pipeline:Common Issues and Solutions
NEAR AI session not found
NEAR AI session not found
Problem:Solution:This will authenticate with NEAR AI and create the session file.
Database connection failed
Database connection failed
Problem:Solution:
- Check that PostgreSQL is running:
- Verify
DATABASE_URLis correct: - Test connection manually:
Docker not found
Docker not found
Problem:Solution (if you need Docker):macOS:Linux:Skip this check if you don’t need code execution features.
Workspace directory is not a directory
Workspace directory is not a directory
Problem:Solution:
The workspace path is occupied by a file. Remove it:Or choose a different path:
What Gets Checked
Configuration Checks
- NEAR AI authentication (session file or API key)
- Database backend (PostgreSQL or libSQL)
- Workspace directory
External Binary Checks
- Docker (for code execution)
- cloudflared (for Cloudflare Tunnels)
- ngrok (for ngrok tunnels)
- tailscale (for Tailscale VPN)
Not Checked
- WASM tools (use
ironclaw tool list) - MCP servers (use
ironclaw mcp list) - Settings values (use
ironclaw config list) - Service status (use
ironclaw service status)
Status vs Doctor
Two commands provide health information:| Feature | ironclaw status | ironclaw doctor |
|---|---|---|
| Speed | Fast | Slower |
| Network calls | No | Yes |
| Binary checks | No | Yes |
| Database probe | Passive | Active |
| Use case | Monitoring | Troubleshooting |
Related Commands
ironclaw status
Quick health check
ironclaw onboard
Fix configuration issues
ironclaw config list
View all settings
