Skip to main content

Migrate from Vercel to Nife

This guide moves a front-end project from Vercel to Nife. You pick the path that matches your project, deploy it on Nife, copy your environment variables, test it on its Nife URL, then switch your domain when you are ready. Your Vercel project keeps running the whole time.

Before you start​

  • A Nife account and an organization.
  • Your project's code in a Git repository (GitHub, GitLab or Bitbucket).
  • Access to your Vercel project settings.

Pick your path​

  • Your project builds to static files (for example a Vite, React, Vue or Astro site, or a Next.js project exported as static HTML): follow Path A, Static site.
  • Your project runs a server (for example a Next.js app that renders on the server, or an API): follow Path B, Web application.

If you are not sure, look at your build output. A folder of HTML, CSS and JavaScript files is a static site. If your app needs a running Node.js process, it is a web application.

How Vercel terms map to Nife​

  • Git deployment: Deploy from Git (GitHub, GitLab or Bitbucket)
  • Build command: Build command
  • Output directory: Output directory (static sites)
  • Environment variables: Environment variables
  • Custom domain: Custom domain (CNAME record)

Step 1: Collect your settings from Vercel​

  1. Open your project in Vercel and go to its settings. Note the framework, the build command and the output directory.
  2. List your environment variables. You can copy them from the project settings, or run vercel env pull in your project folder to write them to a local file.
  3. Note your custom domain, if you use one.

Keep the values somewhere private. Do not paste them into tickets or chat.

Step 2, Path A: Deploy a static site​

  1. In the Nife dashboard, go to Applications and select Deploy App, then choose Static Site.
  2. Enter a site name and choose your organization.
  3. Choose Git as the deployment method, then choose your Git provider and repository, and select the branch to deploy.
  4. Enter your build command and set the output directory to the one you noted in Step 1.
  5. Add your environment variables.
  6. Click Deploy.

If you would rather upload a build, build the project on your machine, compress the contents of the output folder into a .zip, .tar or .tar.gz file, and use Upload Build File instead. Full walkthrough: Upload Build File.

Step 2, Path B: Deploy a web application​

  1. In the Nife dashboard, go to Applications and select Deploy Application.
  2. Choose your organization and enter an application name.
  3. Select Git Repository, choose your Git provider, enter the repository URL and select the branch. For a private repository, add a Personal Access Token as a secret.
  4. Under Ports, set the internal port to the port your app listens on.
  5. Under Build Configuration, choose Auto Dockerize with Runtime and select Node.js, or choose Add Custom Dockerfile if your repository has a Dockerfile.
  6. Add your environment variables, then continue and start the build.

Full walkthrough: Deploy Application from Git.

Step 3: Set your environment variables​

Copy each variable from Step 1 into the deployment settings on Nife. Keep the same names your code already reads.

Variables that your build reads, such as those that start with NEXT_PUBLIC_ or VITE_, are read when the project is built. If you change one later, deploy again so the new value is used.

Step 4: Test on your Nife URL​

  1. When the deployment finishes, open the URL shown on Nife.
  2. Click through your main pages and check that links, images and scripts load.
  3. If something is missing, check the deployment or build logs.

Fix anything here before you change where your users go. Your Vercel project is still live, so nothing is at risk.

Step 5: Move your custom domain​

Do this after the site works on its Nife URL.

  1. Open your site in Nife and choose Add Custom Domain.
  2. Enter your domain name.
  3. Nife shows you a CNAME value. At your DNS provider, add a CNAME record for your domain that points to that value.
  4. Wait for DNS to update. This can take from a few minutes up to 48 hours.
  5. When Nife shows the domain as verified, open your domain and check the site.

If your domain currently points to Vercel, you will replace that record.

Full walkthrough: Custom Domains.

Step 6: Clean up​

Keep the Vercel project for a few days in case you need to go back. When you are sure, remove the domain from Vercel and delete the project there.

What this guide does not cover​

This guide does not cover Vercel serverless or edge functions, image optimization, cron jobs, preview deployments, or storage products. Server-rendered Next.js apps run on Nife as web applications (Path B). If you depend on any of the other features, contact Nife support at support@nife.io before you migrate, and we will help you plan it.

Troubleshooting​

  • Build fails: check the logs. Confirm the build command works on your machine and that the output directory (static) or Dockerfile path (web application) is correct.
  • Blank page on a static site: check the browser console, and make sure asset paths are relative.
  • Web application starts but is not reachable: confirm the internal port matches the port your app listens on.
  • A variable is missing: compare the names with Step 1. Names are case sensitive.
  • Domain does not verify: check the CNAME record name and value, and allow time for DNS to update.

Need help? Email support@nife.io.