---
title: Troubleshooting
sidebarTitle: Troubleshooting
description: Common issues and solutions
---
Solutions for common IronClaw issues.
## Diagnostic Tool
Run diagnostics first:
```bash
ironclaw doctor
```
This checks:
- Database connectivity
- LLM provider access
- Docker availability
- Tunnel configuration
## Common Issues
### Installation
**Cause:** PATH not updated
**Solution:**
```bash
# Add to PATH
export PATH="$HOME/.local/bin:$PATH"
# Or restart your terminal
exec $SHELL
```
**Solution:**
```bash
# Fix ownership
sudo chown -R $USER:$USER ~/.local/bin/ironclaw
# Or move to system path
sudo mv ~/.local/bin/ironclaw /usr/local/bin/
```
### Database
**PostgreSQL:**
```bash
# Check PostgreSQL is running
sudo systemctl status postgresql
# Verify connection
psql postgres://user:pass@localhost/ironclaw
```
**libSQL:**
```bash
# Check permissions
ls -la ~/.ironclaw/
# Fix ownership
chmod 755 ~/.ironclaw
```
**Solution:**
```bash
# Ubuntu/Debian
sudo apt install postgresql-15-pgvector
# Enable extension
sudo -u postgres psql -d ironclaw -c "CREATE EXTENSION IF NOT EXISTS vector;"
```
**Solution:**
```bash
# Find and kill process
lsof ~/.ironclaw/ironclaw.db
kill -9
# Or wait for process to exit
```
### LLM Provider
**Solutions:**
1. Check default browser is set
2. Manually visit the URL shown in terminal
3. On VPS: use API key mode instead
```bash
# Set callback URL for remote servers
export IRONCLAW_OAUTH_CALLBACK_URL=https://your-server:9876
```
**Solutions:**
1. Verify key is copied correctly (no extra spaces)
2. Check key hasn't expired
3. Ensure billing is set up (OpenAI/Anthropic)
**Solution:**
```bash
# Re-authenticate
ironclaw onboard --skip-auth
# Select NEAR AI → re-authenticate
```
**Solutions:**
1. Wait and retry
2. Implement exponential backoff
3. Check your provider's rate limits
4. Consider upgrading tier
**Solutions:**
1. Verify model name spelling
2. Check model availability for your account
3. Try a different model
### Channels
**Solutions:**
```bash
# Check IronClaw is running
ironclaw status
# Verify port
sudo ss -tlnp | grep 3000
# Check firewall
sudo ufw status
sudo ufw allow 3000
```
**Solution:**
```bash
# View logs
RUST_LOG=ironclaw=info ironclaw run 2>&1 | grep "Gateway auth token"
# Or set persistent token
export GATEWAY_AUTH_TOKEN=your-token
```
**Solutions:**
1. Check bot token is valid (test with @BotFather)
2. Verify polling mode or webhook URL
3. Check logs for errors
4. Ensure owner is paired (if using pairing mode)
**Solutions:**
1. Verify HTTPS URL is set (required by Telegram)
2. Check tunnel is running (ngrok, cloudflared)
3. Ensure webhook secret matches
**Solutions:**
1. Send `/start` to your bot in Telegram
2. Re-run `ironclaw onboard --channels-only`
3. Wait 120 seconds for first message
### Sandbox
**Solution:**
```bash
# Install Docker
curl -fsSL https://get.docker.com | sh
# Add user to docker group
sudo usermod -aG docker $USER
# Log out and back in
```
**Solutions:**
1. Increase timeout:
```bash
export SANDBOX_TIMEOUT_SECS=300
```
2. Check for infinite loops in job
3. Verify job logic
**Solutions:**
1. Increase memory limit:
```bash
export SANDBOX_MEMORY_LIMIT_MB=4096
```
2. Optimize job memory usage
3. Use smaller models
### Security
**Solutions:**
- On macOS, click "Always Allow" in keychain dialog
- This is expected OS behavior
- Caching minimizes prompts
**Solution:**
```bash
# Install gnome-keyring
sudo apt install gnome-keyring
# Or use environment variable mode
export SECRETS_MASTER_KEY="your-key"
```
### Platform-Specific
**Expected:** Two dialogs on first access:
1. "Enter your password to unlock the keychain"
2. "Allow ironclaw to access this keychain item"
**Solution:** Click "Always Allow" to prevent repeated prompts.
**Solutions:**
- WSL2 automatically forwards ports
- Use `http://localhost:3000` from Windows
- Check WSL2 is running: `wsl --status`
## Debug Logging
Enable verbose logging:
```bash
# All modules
RUST_LOG=debug ironclaw run
# Just IronClaw
RUST_LOG=ironclaw=debug ironclaw run
# Specific module
RUST_LOG=ironclaw::agent=debug ironclaw run
# With HTTP requests
RUST_LOG=ironclaw=debug,tower_http=debug ironclaw run
```
## Getting Help
If your issue isn't listed:
1. Run `ironclaw doctor --json`
2. Check logs with `RUST_LOG=debug`
3. Search [GitHub Issues](https://github.com/ironclaw-ai/ironclaw/issues)
4. Create a new issue with:
- IronClaw version
- Operating system
- Full error message
- Steps to reproduce
## Next Steps
Frequently asked questions
Command-line reference