docs/self-hosting/advanced/redis/upstash.mdx
Upstash is a serverless Redis service that provides a free tier and pay-as-you-go pricing, making it ideal for LobeHub deployments.
<Image alt={'Copy Redis URL from Upstash'} src={'https://hub-apac-1.lobeobjects.space/docs/43d110283ba816c0c2b45408e4f9d344.png'} />
# Upstash Redis URL (copy from Upstash console)
REDIS_URL=rediss://default:[email protected]:6379
# Optional: Enable TLS (recommended for Upstash)
REDIS_TLS=1
# Optional: Set a prefix for Redis keys
REDIS_PREFIX=lobechat
<Callout type={'info'}>
Upstash uses rediss:// (with double 's') for TLS connections. LobeHub supports this format automatically.
</Callout>
</Steps>
# Upstash Redis Connection URL
REDIS_URL=rediss://default:[email protected]:6379
# Optional: Enable TLS encryption (recommended for Upstash)
REDIS_TLS=1
# Optional: Key prefix for data isolation
REDIS_PREFIX=lobechat
<Callout type={'tip'}> Upstash offers a generous free tier with 10,000 commands per day, which is sufficient for personal use and small deployments. </Callout>
<Callout type={'warning'}> Make sure to keep your Redis URL secure and never expose it in client-side code or public repositories. </Callout>
REDIS_TLS=1 is set