Skip to the article
Aniq-UI

Company WebsitePut the site online

Put the site online

Deploy to Vercel, to any Node.js host or as a Docker image, with your own address.

Set your address first

NEXT_PUBLIC_SITE_URL is the address the site is served from, such as https://www.your-domain.com. The canonical link, the language alternates and the social sharing image are built from it. Left unset, they point at http://localhost:3030.

It is compiled into the build, so set it where the build runs. Every change to it needs a new build.

Where you buildWhere to set it
VercelThe project's Environment Variables, then redeploy
yarn build.env in the site's folder, copied from .env.example
docker build--build-arg NEXT_PUBLIC_SITE_URL=… on the build command

It is the only variable the site reads, and it is not secret.

Vercel

  1. Put the folder in a Git repository

    Push the landing-page-template-3 folder to GitHub, GitLab or Bitbucket.

  2. Import it in Vercel

    Vercel recognises Next.js. Keep its build settings as they are.

  3. Add your address

    Under Environment Variables, add NEXT_PUBLIC_SITE_URL with your domain, then deploy.

  4. Connect your domain

    Add the domain in the project's settings, and check that it matches NEXT_PUBLIC_SITE_URL.

The folder pins Yarn 4 in package.json. If the install on Vercel stops on the Yarn version, add the environment variable ENABLE_EXPERIMENTAL_COREPACK with the value 1 and deploy again.

Any Node.js host

On a server with Node.js 22 or newer, after setting NEXT_PUBLIC_SITE_URL in .env:

Terminalin landing-page-template-3
corepack enable
yarn install
yarn build
yarn start

yarn start serves the site on port 3030; yarn start -p 8080 uses another port. The PORT variable is ignored, because the script sets the port itself. Put a reverse proxy such as Nginx or Caddy in front for HTTPS and your domain, and keep the process running with a manager such as PM2 or systemd.

Docker

The image serves the Next.js standalone build with Node.js 24, as an unprivileged user, on port 3030. Build it with your address, then run it on any host that runs containers:

Terminalin landing-page-template-3
docker build -t company-site --build-arg NEXT_PUBLIC_SITE_URL=https://www.your-domain.com .
docker run -d --restart unless-stopped -p 3030:3030 company-site

The container needs no environment variables when it runs. Point your reverse proxy or the platform's routing at port 3030. A platform that builds from the Dockerfile works the same way: give it NEXT_PUBLIC_SITE_URL as a build argument.

Check it after deploying

  • Your domain opens the English page at /en, and the switcher leads to /ar.
  • In the page source, the canonical link starts with your domain, not localhost.
  • A link to the site shared in a chat shows the preview picture from public/image.png.

Stuck on a step?

Find a fix before you start over.

Troubleshooting

Cookie Preferences

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept All", you consent to our use of cookies for analytics and personalized advertising.