// troubleshooting guide · upstash
Upstash Redis Environment Variables Not Found (Vercel KV, Fly.io)
- Status
- Workaround available
- platforms:
- Vercel, Fly.io, Netlify, Next.js
- updated:
- November 15, 2026
- reports:
- 4
- Method
- how we research
RUNBOOK · upstash/env-variables-not-found4 FIXES
// quick answer
Redis.fromEnv() reads UPSTASH_REDIS_REST_URL/TOKEN (or Vercel's KV_REST_API_URL/TOKEN). If they're missing at runtime, or you use Fly.io's Upstash extension (which has no REST API), the client can't connect. Copy the REST values from the Console and set them in your platform.
Most likely fix: Set the REST variables
How to fix it
// try these in order, the most common fix is first
FIX 1Set the REST variables
- 01Upstash Console > database > Connect > REST tab
- 02Add UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN to your platform's environment settings
- 03Redeploy
Did this fix it?FIX 2Fix projects migrated from Vercel KV
- 01Replace @vercel/kv with @upstash/redis
- 02Keep KV_REST_API_URL/KV_REST_API_TOKEN (fromEnv reads them) or switch to the UPSTASH_ names
- 03If the store is missing in Vercel Storage, create a database in the Upstash Console and add its env vars to the project
Did this fix it?FIX 3On Fly.io, use TCP or a direct database
- 01The Fly.io extension only offers the Redis protocol: use ioredis/redis with the rediss:// URL
- 02If you need REST (edge functions), create the database directly at console.upstash.com instead
Did this fix it?FIX 4Pass credentials explicitly
- 01new Redis({ url: process.env.X, token: process.env.Y }) to rule out naming issues
Did this fix it?
Symptoms
The SDK warns it can't find UPSTASH_REDIS_REST_URL, requests go to 'undefined', the app broke after the Vercel KV to Upstash migration, or no REST URL exists for a Fly.io Upstash database.
Why it happens
- C-01Env vars set locally (.env) but not in the deployment
- C-02Vercel KV store migrated to Upstash and the project still expects old variable names
- C-03Fly.io Upstash Redis extension doesn't provide the REST API
- C-04Variables set for Production but the code runs in Preview
// this guide also covers
- upstash_redis_rest_url not found
- upstash redis fromenv error
- vercel kv upstash migration
- fly io upstash rest api
Still not working?
If Upstash keeps failing, you're not alone. See every Upstash problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
All not loading, error messages & connection guides →
Redis Cloud Connection Timeout (Redis Cloud)
Pinecone 429 Too Many Requests Error (Pinecone)
Other Upstash errors
- Upstash ERR Max Requests Limit Exceeded
- Upstash ERR Max Request Size Exceeded
- Upstash Redis ECONNRESET Error
- Upstash WRONGPASS Invalid or Missing Auth Token
- Upstash ERR Max Concurrent Connections Exceeded
- Upstash Free Database Archived or Deleted
- Upstash Redis Slow or Timing Out
- QStash Signature Verification Failed (Invalid Signature)