Skip to main content
Upstash is your platform’s bouncer. It counts how often each person hits your app and blocks them when they go too fast. Without it, one bad actor could create thousands of fake accounts through your signup form, drain your monthly email allowance by hammering password resets, or slow your app down for real customers. Your app already knows how to enforce those limits, it just needs somewhere to keep the count, and that’s what you’re setting up here. This is the shortest chapter in the course.

Create your account

1

Sign up

Go to upstash.com and click Start For Free in the middle of the page.
Upstash home page with the Start For Free button
Below the Log In button, click Create an account.
Upstash login page with the Create an account link
Enter your professional Hostinger email, choose a password, and click Sign Up.
Upstash signup form
2

Verify your email

Upstash sends a code to your mailbox. Go to mail.hostinger.com, open the email and copy the code.
Upstash verification email containing the code
Paste it into the code field on Upstash and click Submit.
Upstash verification code field

Create your database

1

Go to Redis

You’ll land inside your account on the Vector product page, which isn’t what you need. Upstash sells several products and your app only uses Redis, so click Redis in the top navigation bar.
Upstash account landing on the Vector product page with Redis in the top navigation

You land on Vector by default. Redis is the one your app uses.

The Redis page says no database has been created yet. Click the green + Create Database button on the right.
Upstash Redis page with the Create Database button
2

Configure it

Give it a clear name, such as Rate-limit-database.For Primary Region, select N. Virginia, USA (us-east-1). This is the same region your app runs in on Vercel and the same one you chose for Supabase, so every check your app makes stays inside one data centre instead of crossing the country and back. Your own location doesn’t matter here, only that these three services sit together.Turn Eviction on. It tells Upstash to drop the oldest entries if the database ever fills up, so your rate limiting keeps working instead of failing. Your entries expire on their own within minutes anyway, so this is a safety net that will rarely be needed and costs nothing to have.Click Next.
Upstash database creation form with the region selected and eviction enabled

Region and eviction are the two settings that matter.

3

Choose the free plan

Select the Free plan and click Next.Rate limiting stores tiny entries that disappear within minutes, so the free tier is far more than your app will ever need here.
Upstash plan selection with the Free plan chosen
Check the summary and click Create.
Upstash database summary showing the name, region and monthly cost

Monthly $0, in the same region as the rest of your services.

Connect it to your app

1

Find your credentials

You’ll land on your database’s Details page. Scroll to the Connect section and make sure you’re on the REST tab.You’ll see two values, UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN, which match two of the settings waiting in Vercel.
2

Copy the URL

Copy the value of UPSTASH_REDIS_REST_URL, taking only what’s inside the quotation marks.In Vercel, open your project’s Environment Variables, find UPSTASH_REDIS_REST_URL, click the three dots, click Edit, paste it and click Save.
3

Copy the token

Back in Upstash, the token is hidden by default. Click the eye icon at the top right of the code area to reveal it, then select the value inside the quotation marks and copy it.In Vercel, find UPSTASH_REDIS_REST_TOKEN, click the three dots, click Edit, paste it and click Save.
Unlike the URL, this token gives full read and write access to your database. Don’t share it, and don’t leave it revealed on screen if you’re recording or screenshotting.
Upstash Connect section on the REST tab showing the URL and the hidden token

The URL is on the first line, the token on the second, both inside the quotation marks.

What’s next

Your app is protected against abuse. Next comes Twilio, the longest chapter in the course, where you set up the phone system that carries your customers’ calls.