POSTGRES_URI_CUSTOM Not Working with langgraph dev #771

Closed
opened 2026-02-20 17:41:40 -05:00 by yindo · 4 comments
Owner

Originally created by @ivrschool on GitHub (Jul 6, 2025).

Issue with current documentation:

I want to attach custom postgres db to my agent hosted using langgraph dev.

I tried InMemoryStory and checkpointers and stores but the log says, with langgraph deployment, it handels persistence by its own and we do not need to include store or checkpointer.

However, I want to store the agent talks into my db. I have running postgres server and as the document says, add environment variable POSTGRES_URI_CUSTOM

I have added a line in my .env file:

POSTGRES_URI_CUSTOM=postgresql://postgres:example@localhost:5432/postgres?sslmode=disable

I rerun the deployment command langgraph dev .

I can go to the chat loop but I do not see any tables being created or added to my postgres server.

Here is my langgraph.json:

{
"dependencies": ["."],
"graphs": {
"agent": "./src/agent/graph.py:graph"
},
"env": ".env",
"auth": {
"path": "src/security/auth.py:auth"
}
}

Idea or request for content:

No response

Originally created by @ivrschool on GitHub (Jul 6, 2025). ### Issue with current documentation: I want to attach custom postgres db to my agent hosted using `langgraph dev`. I tried InMemoryStory and checkpointers and stores but the log says, with langgraph deployment, it handels persistence by its own and we do not need to include store or checkpointer. However, I want to store the agent talks into my db. I have running postgres server and as the document says, add environment variable POSTGRES_URI_CUSTOM I have added a line in my `.env` file: POSTGRES_URI_CUSTOM=postgresql://postgres:example@localhost:5432/postgres?sslmode=disable I rerun the deployment command `langgraph dev` . I can go to the chat loop but I do not see any tables being created or added to my postgres server. Here is my langgraph.json: { "dependencies": ["."], "graphs": { "agent": "./src/agent/graph.py:graph" }, "env": ".env", "auth": { "path": "src/security/auth.py:auth" } } ### Idea or request for content: _No response_
yindo added the documentation label 2026-02-20 17:41:40 -05:00
yindo closed this issue 2026-02-20 17:41:40 -05:00
Author
Owner

@ivrschool commented on GitHub (Jul 8, 2025):

solved this.

here is the detailed blog post on this:

https://medium.com/fundamentals-of-artificial-intellegence/attach-external-postgres-and-redis-server-to-self-host-langgraph-apis-e9d6be9fd4f7

@ivrschool commented on GitHub (Jul 8, 2025): solved this. here is the detailed blog post on this: https://medium.com/fundamentals-of-artificial-intellegence/attach-external-postgres-and-redis-server-to-self-host-langgraph-apis-e9d6be9fd4f7
Author
Owner

@sydney-runkle commented on GitHub (Jul 20, 2025):

Plus some updated docs: https://langchain-ai.github.io/langgraph/cloud/reference/env_var/?h=postgres_uri_custom#postgres_uri_custom

@sydney-runkle commented on GitHub (Jul 20, 2025): Plus some updated docs: https://langchain-ai.github.io/langgraph/cloud/reference/env_var/?h=postgres_uri_custom#postgres_uri_custom
Author
Owner

@snji commented on GitHub (Nov 13, 2025):

Plus some updated docs: https://langchain-ai.github.io/langgraph/cloud/reference/env_var/?h=postgres_uri_custom#postgres_uri_custom

I set the POSTGRES_URI_CUSTOM environment variable, but working still didn't work.

Version

uv pip list | grep langgraph                                                      
langgraph                                1.0.3
langgraph-api                            0.5.13
langgraph-checkpoint                     3.0.1
langgraph-checkpoint-postgres            3.0.1
langgraph-cli                            0.4.7
langgraph-prebuilt                       1.0.2
langgraph-runtime-inmem                  0.18.0
langgraph-sdk                            0.2.9

I checked in the langraph api. Is the DATABASE_URI setting fixed? In the langgraph dev mode, won't the postgres URI Settings take effect either?

Image
@snji commented on GitHub (Nov 13, 2025): > Plus some updated docs: https://langchain-ai.github.io/langgraph/cloud/reference/env_var/?h=postgres_uri_custom#postgres_uri_custom I set the POSTGRES_URI_CUSTOM environment variable, but working still didn't work. Version ```bash uv pip list | grep langgraph langgraph 1.0.3 langgraph-api 0.5.13 langgraph-checkpoint 3.0.1 langgraph-checkpoint-postgres 3.0.1 langgraph-cli 0.4.7 langgraph-prebuilt 1.0.2 langgraph-runtime-inmem 0.18.0 langgraph-sdk 0.2.9 ``` I checked in the langraph api. Is the DATABASE_URI setting fixed? In the langgraph dev mode, won't the postgres URI Settings take effect either? <img width="775" height="527" alt="Image" src="https://github.com/user-attachments/assets/582017ad-ed03-4fa1-aab0-4a989000bdd8" />
Author
Owner

@bharathiselvan commented on GitHub (Dec 16, 2025):

I’m trying to configure LangGraph to use a custom PostgreSQL database for persistence, based on the documented environment variable POSTGRES_URI_CUSTOM.

According to the docs:
https://docs.langchain.com/langsmith/env-var#postgres-uri-custom

Specify POSTGRES_URI_CUSTOM to use a custom Postgres instance instead of one provisioned by the platform.

However, even when POSTGRES_URI_CUSTOM is set correctly, LangGraph continues to start with the in-memory runtime.

Example log:

Using langgraph_runtime_inmem
Starting In-Memory runtime with langgraph-api=0.5.16

This happens consistently in local development (langgraph dev).

@bharathiselvan commented on GitHub (Dec 16, 2025): I’m trying to configure LangGraph to use a custom PostgreSQL database for persistence, based on the documented environment variable POSTGRES_URI_CUSTOM. According to the docs: https://docs.langchain.com/langsmith/env-var#postgres-uri-custom Specify POSTGRES_URI_CUSTOM to use a custom Postgres instance instead of one provisioned by the platform. However, even when POSTGRES_URI_CUSTOM is set correctly, LangGraph continues to start with the in-memory runtime. Example log: Using langgraph_runtime_inmem Starting In-Memory runtime with langgraph-api=0.5.16 This happens consistently in local development (langgraph dev).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#771