Skip to content

Moving from Vercel

What a Next.js project on Vercel keeps on Arkor, what to change, what Arkor does not have yet, and how to move a domain.

View as Markdown

A Next.js app that deploys on Vercel needs no Arkor package and no configuration file to deploy on Arkor. Most of what a Vercel project uses carries over as it is. This page lists what does, what to change, and what Arkor does not have yet, then moves a project and its domain.

What carries over

On VercelOn Arkor
Deployments from GitHub on every push to the production branchThe same; see Deploy from GitHub.
Preview deployments of other branchesThe same, at <project>-git-<branch>.arkor.app and at an address for each build; see Preview deployments.
Overridden build and install commands, monorepo root directoriesThe same; see Custom install and build commands.
Environment variables and secretsThe same, for the build and the runtime; see Environment variables.
ISR, use cache, revalidateTag, updateTag, revalidatePathThey work as on a Next.js server; see ISR and caching.
next/image, next/og, middleware and proxy.tsSupported; see Next.js support.
crons in vercel.json, secured with CRON_SECRETRead from vercel.json as they are; see Cron jobs.
@vercel/analytics and @vercel/speed-insightsThey work unchanged; see Web Analytics and Speed Insights.
Password protection and shareable linksAccess protection, for the whole project.
Deploy hooksPOST /v1/projects/{projectId}/source/deploy with an API token; see Public API.
The x-vercel-cache response headerx-arkor-edge, which also says why a page was rendered; see Response headers.

What to change

If your project usesDo this
redirects, rewrites or headers in vercel.jsonMove them to next.config. Only crons is read from vercel.json.
VERCEL_ENV or another of Vercel's system variablesRead ARKOR_ENV and the other names Arkor sets; see Environment variables. Of Vercel's, only VERCEL_URL is set, to the hostname ARKOR_URL holds. A metadataBase built from one of the others is the usual case.
x-vercel-ip-countryRead x-arkor-ip-country. The city, region and coordinates headers have no counterpart.
waitUntil() from @vercel/functionsUse after() from next/server. What it schedules has 30 seconds after the response.
A cron route that checks user-agent: vercel-cron/1.0Check CRON_SECRET instead: Arkor's calls carry arkor-cron/1.0.
NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH or NEXT_PUBLIC_VERCEL_OBSERVABILITY_CLIENT_CONFIGLeave both out when you copy the variables: they point the analytics at Vercel's paths.
export const maxDurationNothing: it is not read.
Vercel Blob, Edge Config or a database from the Vercel MarketplaceCreate an R2 bucket, a KV namespace or a D1 database for the project; see Storage. A service your app reaches over HTTPS with credentials of its own is reached the same way from Arkor.

Check What to change before you deploy as well: not everything a Node.js server runs works on Arkor.

What Arkor does not have yet

  • Notifications by email or chat. Follow builds, and the addresses of previews, on the project's Deployments page, or on GitHub: a build of a push is written back to its commit and to the pull request's comment.
  • A preview per pull request. Previews are made per branch; a pull request's branch has one.
  • A build cache. Every build installs and builds from scratch.
  • Skipping unaffected projects. Every project connected to a repository with Deploy on push on builds on each push to its production branch, whichever files changed.
  • Usage alerts. See what the team has used on Usage, and cap what it is billed with a spend limit.
  • Git hosts other than GitHub.
  • WebSockets in Next.js deployments. Native Hono and fetch handlers can forward WebSocket upgrades.
  • A region for your app. A page that makes several requests to a database in one region can wait longer for each of them than it does next to the database.

Move a project

  1. Import the repository, with its root directory and any command you override on Vercel; see Import a repository.
  2. Copy the environment variables. With the Vercel CLI, vercel env pull .env.production --environment=production writes production's to a file. Remove the lines that start with VERCEL_, and NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH and NEXT_PUBLIC_VERCEL_OBSERVABILITY_CLIENT_CONFIG if they are there. The value of a Secret variable on Vercel (Sensitive, before) cannot be read back: the file holds [SENSITIVE] or nothing in its place, so type the real value. Then choose Paste .env in the project's Settings › Environment variables; see Paste a .env file.
  3. Before you choose Save changes, tick Secret on each row that holds a password, a token or an API key: a pasted row is a plain variable, whose value the dashboard and the API show. Pasted rows are read by production alone, so tick Preview as well on the rows previews need. Where Vercel gives previews a value of their own, add a row with only Preview ticked; vercel env pull .env.preview --environment=preview writes those values to a file.
  4. Deploy with Deploy latest, and open https://<project>.arkor.app. Check the pages that matter: that they render, and how x-arkor-edge says each was served.
  5. Move the domain, as below. Keep the Vercel project until the domain is served from Arkor.

Move a domain

The site is served from Arkor once the domain's CNAME record points at domains.arkor.app.

  1. A day ahead, lower the TTL of the record you will change, to five minutes for example, so the change reaches visitors sooner.
  2. In the Arkor project's Settings › Domains, add the hostname. The first time, publish the TXT record Arkor shows, then add the hostname again; see Add a domain.
  3. Point the hostname's CNAME at domains.arkor.app.
  4. Wait for Connected. Cloudflare issues the certificate once it sees the CNAME, and until then HTTPS requests to the hostname fail, so make the change at a quiet time.
  5. Once the old record's TTL has passed, remove the domain from the Vercel project.

On Vercel, a root domain such as example.com can point at an A record. Arkor has no A record: a root domain needs a DNS provider that puts a CNAME at the root, as Cloudflare DNS does; see Root domains.