---
type: "post"
id: "openclaw-now-supports-postgresdb-for-storage-22dd82"
slug: "openclaw-now-supports-postgresdb-for-storage-22dd82"
title: "OpenClaw now supports PostgresDB for storage."
description: "OpenClaw v2026.11.5 adds beta support for PostgreSQL alongside SQLite, giving operators a way to keep Gateway data on infrastructure managed separately from the Gateway host."
retrieval_nugget: "OpenClaw v2026.11.5 adds beta support for PostgreSQL alongside SQLite, giving operators a way to keep Gateway data on infrastructure managed separately from the Gateway host. The change is aimed at replaceable containers and organizations with database operations already in place; it also brings migration, backup, and availability constraints that make it a poor default for single-machine installs."
published_at: "2026-12-03"
updated_at: "2026-12-03"
record_date: "2026-12-03"
date_kind: "published_at"
topics: []
entities: ["OpenClaw","PostgreSQL"]
related_patterns: []
novelty_label: "new_fact"
what_changed: "OpenClaw adds PostgreSQL as an alternative to SQLite for Gateway storage, first available in v2026.11.5."
prior_refs: ["https://newruntime.com/posts/release-openclaw-2026-11-6-openclaw-openclaw-51f49c/","https://newruntime.com/posts/openclaw-2026-11-10-is-out-97c034/","https://newruntime.com/posts/release-openclaw-2026-11-10-beta-3-openclaw-179252/"]
source_url: "https://openclaw.ai/blog/openclaw-runs-on-postgres"
source_urls: ["https://openclaw.ai/blog/openclaw-runs-on-postgres"]
production: {"schema":"newruntime-production-v1","desk":"newsroom","first_seen_at":"2026-12-03T11:00:31.292Z","independent_sources":1,"notes_synthesized":null,"writer_model":null,"critic":null,"checks":["primary_source_verified","source_fresh","one_story","copy_contract"],"novelty":{"label":"new_fact","confidence":"high"},"editorial_value":"medium","human_review":"selective"}
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:openclaw-now-supports-postgresdb-for-storage-22dd82"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/openclaw-now-supports-postgresdb-for-storage-22dd82/","markdown":"https://newruntime.com/posts/openclaw-now-supports-postgresdb-for-storage-22dd82.md","json":"https://newruntime.com/posts/openclaw-now-supports-postgresdb-for-storage-22dd82.json"}
markdown_url: "https://newruntime.com/posts/openclaw-now-supports-postgresdb-for-storage-22dd82.md"
---

# OpenClaw now supports PostgresDB for storage.

## Retrieval answer

OpenClaw v2026.11.5 adds beta support for PostgreSQL alongside SQLite, giving operators a way to keep Gateway data on infrastructure managed separately from the Gateway host. The change is aimed at replaceable containers and organizations with database operations already in place; it also brings migration, backup, and availability constraints that make it a poor default for single-machine installs.

## Summary
OpenClaw v2026.11.5 adds beta support for PostgreSQL alongside SQLite, giving operators a way to keep Gateway data on infrastructure managed separately from the Gateway host. The change is aimed at replaceable containers and organizations with database operations already in place; it also brings migration, backup, and availability constraints that make it a poor default for single-machine installs.

## What happened
OpenClaw’s announcement says v2026.11.5 is the first release in which a Gateway can use PostgreSQL instead of SQLite. SQLite remains the default. The project warns that PostgreSQL will generally be slower for local database operations because SQLite reads and writes files on the Gateway machine, while PostgreSQL adds communication with a database server, often over a network.

The rationale is deployments where a Gateway is no longer tied to one persistent machine: containers may be torn down and redeployed, or a company may already run a managed database and require production state to live there. OpenClaw says it first consolidated transcript storage from JSONL files into SQLite in July, deleting about 9,400 lines of file-repair, rotation, and locking code. That shared storage layer made a second backend feasible without maintaining two schemas by hand. SQLite remains the schema source of truth; a generator produces the PostgreSQL schema and flags constructs that do not translate cleanly, including SQLite triggers and full-text virtual tables.

Storage is divided into five families: state, agent, workboard, logbook, and team-reports. These cover sessions, transcripts, memory, search indexes, and plugin data. Each family can select its own engine, so an operator can put shared state on PostgreSQL while leaving individual agent stores on SQLite. The announcement describes this as a beta. It requires PostgreSQL 16, 17, or 18, a UTF8 database, and administrator-installed unaccent, pg_trgm, and vector extensions. The runtime role needs permission to connect, create schemas, and own what it creates, but does not need superuser privileges. Connection strings are supplied through a SecretRef rather than stored directly in the configuration file; TLS with verify-full is supported.

For an existing SQLite installation, OpenClaw instructs operators to stop the Gateway and other processes using its state directory, run `openclaw doctor --fix`, then check prerequisites with `openclaw database port --to postgres --dry-run` before executing the port. The migration snapshots source stores and configuration, migrates and verifies a private copy, rebuilds memory indexes offline using cached embeddings, and switches configuration last. It can be resumed or rolled back if interrupted. The port command does not yet run on native Windows. Operators can also move back to SQLite, or port one family at a time.

PostgreSQL does not remove all local state. Each store retains a local SQLite anchor file, and credentials, safety journals, device caches, Logbook frame images, and cold transcript blobs also remain on disk. A complete backup therefore requires both sides: OpenClaw’s `openclaw backup create --output … --verify` bundles PostgreSQL data with matching local state. A raw `pg_dump` alone or a copy of the local state folder alone is insufficient. OpenClaw says macOS support remains experimental, while iOS and iPad are not supported.

## What the archive adds
New Runtime’s earlier coverage on [OpenClaw 2026.11.6](https://newruntime.com/posts/release-openclaw-2026-11-6-openclaw-openclaw-51f49c/) on November 19, [OpenClaw 2026.11.7](https://newruntime.com/posts/openclaw-2026-11-7-adds-conversation-recovery-browser-fbf750/) on November 23, and [OpenClaw 2026.11.10](https://newruntime.com/posts/openclaw-2026-11-10-is-out-97c034/) on November 25 covered successive releases and runtime capabilities. PostgreSQL support is a new storage event in that ongoing product story, not a restatement of those releases.

## Trend signal
This supports [harness architecture outlives model choice](https://newruntime.com/patterns/harness-architecture-outlives-model-choice/) in a limited operational sense: OpenClaw is making the Gateway’s state layer configurable for different deployment environments rather than tying it to a particular local storage arrangement. The announcement does not show that this architecture is becoming a general industry standard, and PostgreSQL support does not itself establish a portable agent harness.

## Why now
OpenClaw says the feature responds to operators running Gateways in replaceable containers or within companies that already have managed database services and policies for production state. It describes Microsoft Autopilot as one example of a containerized Gateway with durable storage outside the container, and says v2026.11.5 makes this deployment shape available to other supported installations.

## Why it matters
For teams whose Gateway containers are disposable, moving database-backed state off the container can simplify replacement and let existing database teams handle backups, grants, sizing, and monitoring. The per-family configuration also permits a partial migration rather than an all-or-nothing move.

The operational tradeoff is real. Network distance adds latency, and PostgreSQL’s approximate vector search with exact reranking can return memory results in a different order from SQLite’s exact vector search. PostgreSQL is not an active-active or failover feature: each store still has one live Gateway owner. Teams must retain local state and back up it together with server data. This is most useful where infrastructure ownership justifies the extra service; for a single machine with trusted local storage, SQLite avoids that burden.

## Limits and uncertainty
OpenClaw labels PostgreSQL support beta, and the announcement does not report production reliability or performance measurements. It says behavior may differ: vector search and full-text scoring use different mechanisms, and memory-query ordering can change. One live Gateway owns each store; the release has no active-active mode or automatic failover. macOS remains experimental, iOS and iPad are unsupported, and native Windows cannot run the port command. Operators also need to preserve local anchor files and other local data, and verify recovery procedures across both PostgreSQL and the Gateway state directory.

## Skill to build now
On a test deployment, practice the documented migration and recovery path before moving production state. Stop the Gateway, run the doctor fix and port dry run, then confirm each intended family reports PostgreSQL as its effective engine. Create a verified backup with `openclaw backup create --verify`, restore it into a fresh namespace, and check that the database and matching local state recover together. Keep the PostgreSQL server close to the Gateway to limit round-trip latency.

## Reader takeaway
PostgreSQL support is a deployment option, not a blanket upgrade. Use it when you need storage managed separately from a replaceable Gateway host; retain SQLite for simple single-machine installs. Before switching, plan for one Gateway owner per store, local files that remain essential, and backups that include both server data and local state.

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Sources](https://newruntime.com/sources/): See the original sources this archive cites.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
