GuidesGetting started

Where does OpenClaw store its config, memory, and workspace?

OpenClaw keeps its config, sessions, and your agent's memory under one home directory. Where it lives, what's inside, and what to back up.

July 17, 2026Updated October 9, 2026The Everpod team
The short answer

Everything OpenClaw knows lives in one place: a hidden folder called .openclaw in the home directory of whichever user runs the Gateway (~/.openclaw on Mac and Linux, the same under your user profile on Windows). Config, sessions, and your agent’s workspace are all in there. Protect that folder and you’ve protected your agent; lose it and your agent starts over as a stranger.

What’s inside the state directory

Three kinds of things live under ~/.openclaw:

Your agent’s “memory” is just files

This is the most reassuring thing about OpenClaw’s design, and worth pausing on. The personality and accumulated knowledge of your agent aren’t locked inside a vendor’s cloud: they’re readable text on a disk you control. You can look at what your agent has written down about you. You can edit it. And because it’s just a directory, your agent is portable: the state directory on a machine running the same OpenClaw version is the agent.

The flip side is that those files include sensitive things: your conversations, your agent’s notes, and configuration that can contain credentials. Anything that copies the directory (including backups) copies the secrets too, so backups deserve the same care as the machine itself, and deleting an agent properly means deleting its backups as well.

Running in Docker? One rule matters

In a container setup, the state directory must be mounted as a volume, a folder that lives on the host machine and is handed into the container. Get this right and OpenClaw survives container restarts, recreations, and version upgrades with its memory intact. Get it wrong (state written inside the container’s own filesystem) and everything your agent learned disappears the first time the container is recreated. If you take one line from this guide: make sure .openclaw lives on the host, not in the container.

What to back up

Back up ~/.openclaw and you’ve backed up the agent: config, sessions, workspace, memory. One catch since OpenClaw 2: the Gateway writes its databases while it runs, and OpenClaw’s backup docs warn that a raw copy of a live database file “can be torn or corrupt.” So let OpenClaw make the copy: openclaw backup create --verify writes a checked archive of config, credentials, sessions and workspaces, and on a laptop your normal machine backup can then carry that archive. On a server, run the same command on a schedule, or keep your host’s whole-disk snapshots, which capture the disk at one instant rather than copying files one by one. Either way, test a restore once before you rely on it, because an untested backup is a hope, not a plan; the backup guide has the restore. (On Everpod’s OpenClaw pod, backups run every day with restores tested, as part of what’s managed for you.)

Give your AI agents a permanent cloud computer.

We set it up and secure it, so all you do is use them. Run Claude Code, Codex or any agent you use, more at once than your laptop can hold, and keep them working when it’s closed. Or have OpenClaw set up and run for you.

See the developer pod

From $24/mo · your own plan or API key

Get your OpenClaw agent

$29/mo, cancel anytime · model usage included