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 build | Where to set it |
|---|---|
| Vercel | The 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
Put the folder in a Git repository
Push the
landing-page-template-3folder to GitHub, GitLab or Bitbucket.Import it in Vercel
Vercel recognises Next.js. Keep its build settings as they are.
Add your address
Under Environment Variables, add
NEXT_PUBLIC_SITE_URLwith your domain, then deploy.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:
landing-page-template-3corepack enable
yarn install
yarn build
yarn startyarn 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:
landing-page-template-3docker 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-siteThe 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.