OpenClaw ENOENT: openclaw.json Not Found — How to Fix (2026)

Fix the ENOENT error when OpenClaw cannot find openclaw.json. Step-by-step guide to resolve missing config file issues in your OpenClaw deployment.

What Causes the ENOENT Error?

The ENOENT: no such file or directory, open 'openclaw.json' error is one of the most common issues when setting up OpenClaw for the first time. It means the OpenClaw process cannot locate its configuration file.

Common causes include:

  • Running openclaw start from the wrong directory
  • The config file was never created during installation
  • Docker volume mount is misconfigured
  • File permissions prevent reading the config

Step-by-Step Fix

1. Check Your Current Directory

Make sure you're in the OpenClaw installation directory:

cd /opt/openclaw  # or wherever you installed OpenClaw
ls openclaw.json  # verify the file exists

2. Create the Config File If Missing

If the file doesn't exist, generate one:

openclaw init
# Or copy from the example:
cp openclaw.example.json openclaw.json

3. Fix Docker Volume Mounts

If you're using Docker, ensure your docker-compose.yml correctly mounts the config:

services:
  openclaw:
    image: ghcr.io/openclaw/openclaw:latest
    volumes:
      - ./openclaw.json:/app/openclaw.json:ro
      - ./data:/app/data

4. Set the Config Path via Environment Variable

Alternatively, use an environment variable to specify the config location:

export OPENCLAW_CONFIG_PATH=/path/to/your/openclaw.json
openclaw start

5. Check File Permissions

chmod 644 openclaw.json
# If running as a different user:
chown openclaw:openclaw openclaw.json

Frequently Asked Questions

What does ENOENT openclaw.json mean?

ENOENT stands for "Error NO ENTry" — it means OpenClaw tried to read the openclaw.json configuration file but could not find it at the expected path. This usually happens when you run OpenClaw from the wrong directory or the config file was never created.

Where should openclaw.json be located?

The openclaw.json file should be in the root directory of your OpenClaw installation. If you installed via Docker, it should be mounted into the container at /app/openclaw.json or the path specified in your docker-compose.yml.

How do I create a default openclaw.json?

Run "openclaw init" to generate a default configuration file. Alternatively, copy the example config from the OpenClaw repository: cp openclaw.example.json openclaw.json, then edit it with your settings.

Can I use environment variables instead of openclaw.json?

Yes, OpenClaw supports environment variables as an alternative to the JSON config file. Set OPENCLAW_CONFIG_PATH to point to a custom location, or use individual environment variables like OPENCLAW_PORT, OPENCLAW_API_KEY, etc.

Related Articles

Skip the Config Headaches

Deploy OpenClaw in under a minute with zero configuration errors.

Get Started Free