# Import from Vercel

URL: https://forculuslabs.tech/docs/deploy/import-vercel/

> Move a Vercel project here with its settings, production variables and cron jobs, using a token you paste once.

To move from Vercel with your production variables and cron jobs, run `forculus import vercel:<project>`. It reads a Vercel project with a token of yours, clones the repository it’s linked to, and sets it up here as a new app. [Import from another host](https://forculuslabs.tech/docs/deploy/import/) covers what every import does, and [Vercel and Forculus](https://forculuslabs.tech/compare/vercel) compares how each keeps an app private.

## Make a token

1. In Vercel, open **Account Settings**, then **Tokens**.
2. Create a token. Give it the scope of the team that owns the project, and an expiry of a day: it’s needed for a minute.
3. Copy it.

The import asks for it at a hidden prompt, or reads `VERCEL_TOKEN` if it’s set, the variable Vercel’s own CLI reads. It’s sent to Vercel’s API and nowhere else, used for this import only, and never saved. Delete it in Vercel afterwards if you like.

## Import

```sh
forculus import vercel:expense-tracker acme/expenses
```

For a team’s project, add the team’s id or slug:

```sh
forculus import vercel:expense-tracker acme/expenses --team acme-finance
```

The project can be named by its name or its id (`prj_...`). Without a third argument the code is cloned into a new directory named after the project. To import code you already have, run it from the project’s directory with `.` as the third argument.

## What’s read

Two requests to Vercel’s REST API, documented at vercel.com/docs/rest-api (read 7 October 2026):

| Request                                        | For                                                                                                                                              |
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `GET /v9/projects/{project}`                   | The framework, build and install commands, output directory, root directory, the linked repository and its production branch, and the cron jobs. |
| `GET /v10/projects/{project}/env?decrypt=true` | The variables, with their values where Vercel shows them.                                                                                        |

Only variables that apply to Production come over. One set for Preview, Development or a single branch stays behind. Vercel’s own system variables, like `VERCEL_URL`, are left out.

Vercel’s **Secret** variables (called Sensitive before) are write-only: nobody can read them back, including through the API. None becomes a plain environment variable here. One that’s a key for an [API we know](https://forculuslabs.tech/docs/deploy/import/#apis-we-know) becomes a secret, and the import asks for its value at a hidden prompt once you’ve said go ahead. Any other is left for you to store, and the plan says how. Answer `n` to leave it for later. To give them without being asked, put them in a file and pass `--env-file`:

```sh
forculus import vercel:expense-tracker acme/expenses --env-file prod.env
```

`vercel env pull --environment=production prod.env` writes one, though it can’t read Secret values either.

## Settings

| Vercel                                               | Here                                                                                                                                                                                                                            |
| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Framework                                            | Detected from the code, as for any deploy. Next.js runs as a [container](https://forculuslabs.tech/docs/deploy/containers/) unless it uses OpenNext, then as a [Worker](https://forculuslabs.tech/docs/deploy/workers/#nextjs). |
| Root Directory                                       | The app’s directory inside the clone, where `forculus.json` is written and deploys run.                                                                                                                                         |
| Build Command, Install Command, Output Directory     | `build.command`, `build.install` and `build.output` in forculus.json, when they’re set. Left empty, Vercel used the framework’s own, and so does detection.                                                                     |
| Hugo, Jekyll, Zola and MkDocs                        | A static site built with that program, which has to be installed where you deploy from.                                                                                                                                         |
| `vercel.json` build settings                         | Read too, and they win over the dashboard’s, as on Vercel.                                                                                                                                                                      |
| Cron jobs                                            | [Schedules](https://forculuslabs.tech/docs/apps/schedules/), once the app is live.                                                                                                                                              |
| Deployment Protection                                | Nothing to do: only people you share the app with can open it.                                                                                                                                                                  |
| `rewrites`, `redirects` and `headers` in vercel.json | `_redirects` and `_headers` files for a static site, or the server’s own code.                                                                                                                                                  |
| Functions in `api/`, outside Next.js                 | A Worker or a container’s server.                                                                                                                                                                                               |
| Vercel KV, Postgres, Blob and Edge Config            | See [what doesn’t come along](https://forculuslabs.tech/docs/deploy/import/#what-doesnt-come-along).                                                                                                                            |

## Errors

```text
error: Vercel didn't accept the token, or it can't see project expense-tracker. Make a token with access to it and try again.
```

The token is wrong, expired, or scoped to another team.

```text
error: Vercel can't find the project nope with this token. Check the name, and add --team for a team's project.
```

```text
error: expense-tracker isn't linked to a git repository, so we can't fetch its code. Run this again in the project's directory, with . as DIR.
```

A project deployed with `vercel deploy` from a computer has no repository. Run the import where its code is.

## From the dashboard

In **Apps**, select **Import**, then **Vercel**. Enter the project, the team if it’s a team’s, and the token. See [Import from another host](https://forculuslabs.tech/docs/deploy/import/#from-the-dashboard).
