Vercel cron, KV and Blob: self-hosted equivalents
- Vercel Cron
- Vercel KV
- Vercel Blob
- Vercel Postgres
- Edge Config
- Analytics and Speed Insights
- Preview deployments
- Migration order
Moving a Next.js app off Vercel is usually easy for the app itself. The harder part is the platform products the app quietly depends on: cron jobs, KV storage, blob storage and Postgres. Each has a straightforward self-hosted equivalent.
Vercel Cron
Vercel Cron calls an API route on a schedule defined in vercel.json. On your own server, options include:
- A scheduled task in your deployment platform that runs
curlagainst the same route - A small cron container
- A job scheduler in the app, such as a worker using a queue with repeatable jobs
Keep the route, but protect it with a secret header so only your scheduler can call it.
Vercel KV
Vercel KV is a Redis-compatible store. Self-host Redis or Valkey in a container, with persistence enabled if the data matters. Update the client to use a standard Redis connection string. If code uses the @vercel/kv package, switching to ioredis or redis usually takes a few lines.
Vercel Blob
For file uploads, use S3 compatible storage: a managed bucket from Cloudflare R2, Backblaze B2 or Hetzner, or MinIO on a separate server. Replace the upload calls with the AWS SDK pointed at the new endpoint. Plan a one-time copy of existing files and update stored URLs.
Vercel Postgres
Run Postgres in a container on the same server or a dedicated one. Migrate with pg_dump and pg_restore. Set up scheduled backups to object storage from day one, since the managed service handled that for you.
Edge Config
Edge Config stores small configuration values read at low latency. A simple replacement is environment variables for rarely changing values, or a small table in Postgres cached in memory.
Analytics and Speed Insights
Self-hosted analytics such as Plausible or Umami cover page views. For performance data, the web-vitals library can send metrics to your own endpoint.
Preview deployments
If your workflow relied on preview URLs per pull request, look for a deployment platform that creates previews on your own server with wildcard domains.
Migration order
- Replace storage products while still on Vercel, pointing to the new services
- Verify everything works
- Move the app itself
Doing it in this order means the final cutover is just a DNS change.
For a comparison of platforms that replace Vercel’s deployment experience on your own servers, see this guide to self-hosted Vercel alternatives.
Disclosure: I work on Peon.
Write a comment