Vercel project setup beyond the first deploy

What a SaaS on Vercel needs after the first deploy: token scope, Git access, variable environments, domain records, a pooled database and plan limits.

Simon, Founder of Shipyard

By · Founder of Shipyard

7 minute read

Five decisions the import wizard does not ask you

Importing a repository into Vercel gives you a working vercel.app address in a minute or two. A product needs five more things settled: which token automation may use, which environments each variable applies to, the DNS records for your own domain, where the database lives (Vercel does not run one), and whether the free plan is allowed for what you are building. Each has one detail that regularly costs an afternoon, and this page goes through them in the order they come up.

Token scope: account, team or one project

Access tokens are created on the Account Tokens page of your personal account. Enter a name, open Scope, choose, pick an expiry and press Create. The value is displayed once and starts with vcp_.

The scope decides how much damage a leaked token can do, and it also changes how you call the API. A token scoped to a team or a project already implies the team, so requests need no extra parameter. A Full Account token acts on your default team unless you add ?teamId= to each request, which is the usual reason a script "cannot find" a project that is plainly there in the dashboard.

A failed call tells you which problem you have. A 403 whose error object contains "invalidToken": true means the token is wrong, expired or deleted. A 403 with "missingToken": true means the header never arrived, often because the environment variable holding the token is empty in that shell.

Terminal
curl "https://api.vercel.com/v9/projects" \
  -H "Authorization: Bearer $VERCEL_ACCESS_TOKEN"

# with a Full Account token, name the team
curl "https://api.vercel.com/v9/projects?teamId=$VERCEL_TEAM_ID" \
  -H "Authorization: Bearer $VERCEL_ACCESS_TOKEN"
ScopeReachesGood for
Full AccountYour personal account and every team you belong toRarely the right choice for a tool
Team (select a team, then All Projects)Everything in that one teamA tool that creates projects
Project (select a team, then one project)That project only; team-level and user-level calls are refusedCI for an existing project

Git access is granted on GitHub, not on Vercel

Vercel reads your code through the Vercel GitHub App. When you installed it you chose All repositories or Only select repositories. With the second choice the app cannot see a repository you created afterwards, and the import screen simply does not list it. The fix is on the GitHub side: Settings, Applications, Installed GitHub Apps, Configure next to Vercel, then add the repository under Repository access and save.

Two ownership rules sit on top of that. For a repository under a personal account you must be its owner; a collaborator cannot connect it to a Vercel project. For a repository in an organisation the app has to be installed on that organisation, and you need to be an owner, or a member with write access to the repository.

Once connected, a push to the production branch, usually main, creates a production deployment and updates your domains. A push to any other branch creates a preview deployment with its own address.

Variables: environment, type, and the redeploy people forget

Each variable is applied to one or more environments. Production is used by deployments from the production branch. Preview is used by every other branch, and can be narrowed to a single branch. Development is what vercel env pull downloads into .env.local for work on your machine. A key added to Production only does not exist in a preview build, and the failure there rarely mentions the variable.

Each variable also has a type. Config values stay readable to team members with access; Secret values are write-only once saved. Use Secret for keys and connection strings.

Then the part that catches everyone once: a change to a variable applies only to new deployments. The deployment that is live keeps the values it was built with until you redeploy. For names starting with NEXT_PUBLIC_ it is stricter still, because Next.js copies those into the browser bundle at build time. They must be set for the environment being built, referenced by their full name in code, and never used for anything secret.

The combined size of all variables on a deployment is limited to 64 KB, which only matters if you store certificates or large JSON keys in them.

Terminal
vercel env pull
# writes the Development variables of the linked project to .env.local

Your domain: an A record, a CNAME, and the values from your own project

In the project open Settings, Domains, press Add Existing and enter the domain. When you add a bare domain such as example.com, Vercel offers to add www as well. Take it, and decide which of the two is the main address; the other redirects.

Vercel asks for an A record on the bare domain and a CNAME on a subdomain. Use the values shown in your project. The CNAME target is unique per project, in a form like d1d4fc829fe7bc7c.vercel-dns-017.com, so a value copied from a tutorial or from another project of yours is the wrong one. If the dashboard reports an invalid configuration, the first thing to look for is an older A, AAAA or CNAME record on the same name at your DNS provider.

A third record appears only in one case. If the domain is already in use by another Vercel account or team, Vercel asks you to prove access with a TXT record at _vercel on the bare domain. You do not need Vercel's nameservers for any of this unless you want a wildcard domain.

DomainTypeNameValue
example.comA@the IP address shown in your project
www.example.comCNAMEwwwthe project's own target, ending in vercel-dns-...com
only if askedTXT_vercelthe verification value shown

The database lives somewhere else

Vercel runs your server code as functions that start on demand, not as one long-lived process, and it has no Postgres of its own. The database comes from another provider, and the connection has to suit short-lived code. With Supabase that means the transaction-mode pooler on port 6543, not the direct connection: it works over IPv4 and shares a small number of real connections between many function instances. Its one limitation is that prepared statements are not supported, so switch them off in your driver (prepare: false in Postgres.js and Drizzle, pgbouncer=true in a Prisma connection string), and keep the pool size in each function at 1.

Functions also do not stay up to poll a queue. Scheduled work can be done with Vercel Cron. For a permanent worker Vercel introduced Daemons in October 2026: containers that run continuously next to the app. They are in beta and run only in production for now. Shipyard does not set up Daemons, so in a Shipyard launch a worker still means a host such as Railway.

Previews are protected, production is not, and webhooks only know production

Deployment Protection decides who can open your deployment addresses. The setting Vercel recommends, Standard Protection, protects every deployment address except your production domains, and with Vercel Authentication as the method a preview link asks the visitor to log in to Vercel. That is what you want for unreleased work. It also means an outside service cannot reach a preview: a Stripe webhook endpoint registered on a preview address gets a login page, not your handler. Test payment webhooks locally with the Stripe CLI or against production in test mode.

The generated vercel.app address of the production deployment is protected too under Standard Protection. Code that calls its own API through VERCEL_URL starts failing once protection is on; use the public domain or a relative path.

Plan limits that decide things

Vercel limits the Hobby plan to personal, non-commercial use. A product that charges customers belongs on Pro, where developer seats cost 20 US dollars per user a month as of November 2026. Pro is also the plan with spend management, which lets you cap what a traffic spike or a runaway bot can cost.

LimitHobbyPro
Commercial useNot allowedAllowed
Function maximum duration300 seconds300 seconds by default, configurable up to 800
Deployments per day1006,000
Domains per project50Unlimited
Runtime logs kept1 hour1 day
Spend managementNot availableConfigurable

What Shipyard sets up on Vercel

With Vercel chosen as host, Shipyard creates the project with the framework set to Next.js and the GitHub repository attached in the same call, then starts the first production deployment. If Vercel answers that it cannot see the repository, the run stops and tells you to install or widen the GitHub App, then resumes where it left off. It adds the bare domain and www, reads the recommended records for your project from Vercel's API, writes them to your Cloudflare zone as DNS-only records, and waits until Vercel reports the domain verified and correctly configured.

Variables are written in one upsert for Production and Preview, as plain values for NEXT_PUBLIC_ names and encrypted for everything else, and Shipyard then triggers a new production deployment so the running site has them. Because Shipyard's Vercel adapter creates no database and no worker, the stack picker moves the database to Supabase when you choose Vercel and refuses a worker with a pointer to Railway or Vercel Cron.

Yours to do: create the account, move to Pro before taking money, install the Vercel GitHub App, and create a token scoped to the one team the project should live in.

Sources

Launch in an hour, not a weekend

Shipyard connects your accounts once, then sets up the domain, hosting, database, email and payments for every new product.

See how it works

Read next