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.
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 Vercel | On Arkor |
|---|---|
| Deployments from GitHub on every push to the production branch | The same; see Deploy from GitHub. |
| Preview deployments of other branches | The same, at <project>-git-<branch>.arkor.app and at an address for each build; see Preview deployments. |
| Overridden build and install commands, monorepo root directories | The same; see Custom install and build commands. |
| Environment variables and secrets | The same, for the build and the runtime; see Environment variables. |
ISR, use cache, revalidateTag, updateTag, revalidatePath | They work as on a Next.js server; see ISR and caching. |
next/image, next/og, middleware and proxy.ts | Supported; see Next.js support. |
crons in vercel.json, secured with CRON_SECRET | Read from vercel.json as they are; see Cron jobs. |
@vercel/analytics and @vercel/speed-insights | They work unchanged; see Web Analytics and Speed Insights. |
| Password protection and shareable links | Access protection, for the whole project. |
| Deploy hooks | POST /v1/projects/{projectId}/source/deploy with an API token; see Public API. |
The x-vercel-cache response header | x-arkor-edge, which also says why a page was rendered; see Response headers. |
What to change
| If your project uses | Do this |
|---|---|
redirects, rewrites or headers in vercel.json | Move them to next.config. Only crons is read from vercel.json. |
VERCEL_ENV or another of Vercel's system variables | Read 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-country | Read x-arkor-ip-country. The city, region and coordinates headers have no counterpart. |
waitUntil() from @vercel/functions | Use after() from next/server. What it schedules has 30 seconds after the response. |
A cron route that checks user-agent: vercel-cron/1.0 | Check CRON_SECRET instead: Arkor's calls carry arkor-cron/1.0. |
NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH or NEXT_PUBLIC_VERCEL_OBSERVABILITY_CLIENT_CONFIG | Leave both out when you copy the variables: they point the analytics at Vercel's paths. |
export const maxDuration | Nothing: it is not read. |
| Vercel Blob, Edge Config or a database from the Vercel Marketplace | Create 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
- Import the repository, with its root directory and any command you override on Vercel; see Import a repository.
- Copy the environment variables. With the Vercel CLI,
vercel env pull .env.production --environment=productionwrites production's to a file. Remove the lines that start withVERCEL_, andNEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATHandNEXT_PUBLIC_VERCEL_OBSERVABILITY_CLIENT_CONFIGif 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. - 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=previewwrites those values to a file. - Deploy with Deploy latest, and open
https://<project>.arkor.app. Check the pages that matter: that they render, and howx-arkor-edgesays each was served. - 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.
- A day ahead, lower the TTL of the record you will change, to five minutes for example, so the change reaches visitors sooner.
- 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.
- Point the hostname's CNAME at
domains.arkor.app. - 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.
- 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.