off your laptop. onto the internet.
Until now, your site has only lived at localhost:3000, an address that works on your computer and nowhere else. This step gives it a real address anyone can open. Vercel does the work: it watches your repository on GitHub, builds your site whenever the code changes, and serves it to the world. You set it up once, and from then on, publishing is a push.
| On your computer | On the internet |
|---|---|
| localhost:3000 | your-site.vercel.app (your own domain in the next step) |
| Your keys in .env, if you added any | The same keys in Vercel's Environment Variables |
| npm run dev | Vercel builds and runs it for you after every push |
- On your computer
- localhost:3000
- On the internet
- your-site.vercel.app (your own domain in the next step)
this is a work in progress
Connect.
Point Vercel at your repository.
Key it.
Only if you added any.
Ship it.
Deploy, then check it live.
Connect.
Point Vercel at your repository.
Success.your site has a real address.
1️⃣ Connect Your Repository
Go to vercel.com and sign up with Continue with GitHub, using the same GitHub account that holds your copy. Signing in through GitHub is what lets Vercel see your repository and rebuild it when it changes.
Vercel asks you to pick a plan. The free Hobby plan is for personal, non-commercial projects. If your site is for a business or makes money, Vercel's terms call for Pro. Compare them at vercel.com/pricing, and choose knowing what your site is for.
- In your Vercel dashboard, click Add New… and choose Project
- Find your repository under Import Git Repository and click Import
- Not in the list? Your repository is private, so Vercel needs permission first. Click Adjust GitHub App Permissions, choose Only select repositories, pick yours, and save
- On the next screen, leave the settings as they are: Vercel recognizes Next.js and uses your copy's own build command
- No keys to add? Skip to 3️⃣ and click Deploy. It needs none
2️⃣ Your Keys, If You Have Any
Your site needs no keys to go live. Have no .env file? Skip to 3️⃣. Added a database or sign-in already? Your .env file never leaves your computer, so Vercel has never seen your keys, and you give them to it directly. First, one new key. With a database, your site runs five small jobs once a day, like clearing out visitor data older than 30 days. Vercel starts each job and sends a password along with it, so your site knows the request really came from Vercel. That password is CRON_SECRET, and you make it yourself:
# Prints a long random password (works on Mac and Windows)
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"# .env
CRON_SECRET="the-long-random-string-it-printed"Now hand all of them to Vercel at once. Back on the import screen:
- Open the Environment Variables section
- Open .env in your editor, select everything, and copy it
- Click into the first Key box and paste. Vercel splits the file into one row per key
- Check each value: no quote marks around it, no spaces at either end
| Key | From which step |
|---|---|
| DATABASE_URL | Create your database (the one with -pooler) |
| DIRECT_DATABASE_URL | Create your database |
| NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY | Add sign-in |
| CLERK_SECRET_KEY | Add sign-in |
| FOUNDER_USER_ID | Make yourself admin |
| CRON_SECRET | This step |
- Key
- DATABASE_URL
- From which step
- Create your database (the one with -pooler)
Add the rows you have, and leave out the rest. Later steps add more, like payments and email, and each one goes in both places: .env and Vercel. A key added after your first deploy needs a redeploy before your site sees it.
3️⃣ Deploy and Check It Live
Click Deploy. Vercel copies your code, runs the same build your copy was tested with, and publishes the result. The first build takes a few minutes. The log scrolls a lot, and two lines in it look like problems but are not: Swift not available, using pre-generated colors and ffprobe not available, using pre-generated video metadata. Your copy ships with those files already made.
When Vercel celebrates, open your new address (it ends in .vercel.app) and walk it the way you did in First run:
- The homepage opens, at an address anyone can visit
- An article opens, and /admin sends you to sign in
- In Vercel, open your project's Settings. Under Build and Deployment, Node.js Version says 24.x, the same version as your computer
- If you added sign-in: sign in with your usual account. Your computer and your live site share the same sign-in and the same database, so you are already admin
- If you added a database: under Cron Jobs, click Run next to /api/cron/db-cleanup, then check Logs: it should answer without Unauthorized
“Same code, same you. Now with an address.”
— unparty-app
⚠️ What Changes Now
- Pushing to main publishes — every time you push to your main branch in GitHub Desktop, Vercel rebuilds and your live site updates within minutes. Anything you push is live
- Other branches get a preview — push a different branch and Vercel gives it its own private test address, leaving your live site alone
- Changing a key needs a redeploy — edit a value in Vercel's Environment Variables, then open Deployments, click ⋯ on the newest one, and choose Redeploy
- One database, two sites, if you added one — your computer and your live site read and write the same database. Delete a step on localhost and it is gone from the live site too
- Sign-in says Development mode, if you added it — you are still using Clerk's development keys. That is fine for now. The domain step switches you to production keys
- Five jobs answer Unauthorized in your logs — they run once a day and have nothing to do without a database. Harmless
🧯 If the Build Fails
- Sign in says no sign-in here yet on your live site, after you added it — the two Clerk keys are missing or swapped in Vercel. The one starting pk_ is the publishable key. Fix them, then redeploy
- The site builds but pages say they cannot reach the database — a value probably kept its quote marks or picked up a space. Edit it, then redeploy
- A cron job answers Unauthorized — CRON_SECRET is missing in Vercel, or you changed it without redeploying
🤖 Ask Your LLM
My Next.js site failed to build on Vercel. Here is the end of the
build log: [paste the last 40 lines]. What went wrong, in plain
words, and what should I change in Vercel? Do not ask me for my keys.
Read vercel.json and the files in src/app/api/cron/ in this project.
Explain in plain words what each scheduled job does and what
happens if CRON_SECRET is missing.✅ You Are Done When
- Your project in Vercel is connected to your repository and its latest deployment says Ready
- Your .vercel.app address opens your homepage and your articles
- If you added any keys, Vercel has them too, with a CRON_SECRET that also sits in .env
Your site is live. Next is Your domain: trading .vercel.app for an address that is yours.
“Built on your computer. Running for everyone.”
— unparty-app
SHIP. connect your own domain and process.
Your site has only ever run on your computer. Put it on the internet, where anyone can open it.
Trade .vercel.app for an address that is yours. If you added sign-in, switch it from practice keys to real ones.
Your site has only ever run on your computer. Put it on the internet, where anyone can open it.