# Enhancement: Allow configuring Redis host/URL via environment variables in test\_redis\_cache.py

**URL:** <https://forum.langchain.com/t/enhancement-allow-configuring-redis-host-url-via-environment-variables-in-test-redis-cache-py/5029>\
**Category:** LangGraph\
**Tags:** python-help, feature-request\
**Created:** [November 3, 2026, 11:51pm UTC](https://forum.langchain.com/t/enhancement-allow-configuring-redis-host-url-via-environment-variables-in-test-redis-cache-py/5029 "2026-11-03T23:51:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wuzm2k05](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/wuzm2k05/32/3419_2.png) [@wuzm2k05](https://forum.langchain.com/u/wuzm2k05)\
**Post date:** [November 3, 2026, 11:51pm UTC](https://forum.langchain.com/t/enhancement-allow-configuring-redis-host-url-via-environment-variables-in-test-redis-cache-py/5029/1 "2026-11-03T23:51:07Z")

</div>

### Summary

In `libs/checkpoint/tests/test_redis_cache.py`, the setup fixture currently hardcodes `host="localhost"` when initializing the `redis.Redis` client.

In my development environment, I have a dedicated Redis instance persistently running on my local area network (LAN) rather than directly on `localhost:6379`. Because the restriction, I have to start one redis (or do some network tricky ) locally every time to run test suite.

This restricts developers from running the Redis test suite against custom, containerized, or remote LAN Redis instances via standard environment variables (such as `REDIS_HOST`, `REDIS_PORT`, or `REDIS_URL`). Unless OS-level port forwarding or host rewrites are applied, these tests are automatically skipped (`SKIPPED (Redis server not available)`) whenever Redis is running on a different host or containerized network.

### Proposed Solution

Support reading the Redis connection configuration from environment variables with sensible defaults falling back to `localhost:6379`. For example:

- `REDIS_HOST` (default: `"localhost"`)
- `REDIS_PORT` (default: `6379`)
- Or optionally supporting `REDIS_URL`

---

<div class="post-metadata">

**Author:** ![keenborder786](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/keenborder786/32/1757_2.png) [@keenborder786](https://forum.langchain.com/u/keenborder786)\
**Post date:** [November 4, 2026, 2:13pm UTC](https://forum.langchain.com/t/enhancement-allow-configuring-redis-host-url-via-environment-variables-in-test-redis-cache-py/5029/2 "2026-11-04T14:13:16Z")

</div>

@wuzm2k05 welcome to langchain community. Will recommend you open this is a suggestion on official langgraph repo: [GitHub - langchain-ai/langgraph: Build resilient agents. · GitHub](https://github.com/langchain-ai/langgraph/tree/main)
