Skip to the article
Aniq-UI

SaaS TemplateRun the site locally

Run the site locally

Get the SaaS landing page running on your computer with two Docker commands.

Before you start: install and open Docker Desktop, or Docker Engine on Linux. Nothing else is needed.

View requirements
  1. Download your template

    Open My templates in your Aniq UI dashboard and download the ZIP.

    Expected result: A file named like Nextjs-landing-page-template-2-main-….zip is in your downloads.

  2. Unzip and open the folder

    Extract the ZIP and open a terminal in the Nextjs-landing-page-template-2 folder. On Windows, extract it in File Explorer, then open a terminal in the folder.

    Terminal
    unzip Nextjs-landing-page-template-2-*.zip
    cd Nextjs-landing-page-template-2

    Expected result: The folder lists Dockerfile, package.json, messages, public and src.

    Having trouble?
  3. Build the image

    Docker installs the dependencies and builds the site inside the image. The first build takes a few minutes and needs an internet connection; later builds reuse what did not change.

    Terminalin Nextjs-landing-page-template-2
    docker build -t analytics-landing .

    Expected result: The build ends with a line naming the image analytics-landing.

    Having trouble?
  4. Start it and open the site

    Start a container from the image, then open localhost:3030/enLocal. Leave the terminal open while you use it.

    Terminalin Nextjs-landing-page-template-2
    docker run -p 3030:3030 analytics-landing

    A port is already in use?

    If the start stops with port is already allocated or address already in use, another program uses port 3030. Either stop it, or change the number on the left of -p and open that port instead: docker run -p 3041:3030 analytics-landing, then localhost:3041/enLocal.

    A port is already in use

    Expected result: The home page opens in English, with the dashboard preview under the headline. The language menu in the header switches to Arabic.

    Having trouble?

Stop and start again

Press Ctrl+C in the terminal to stop the site. If you closed that terminal, find the container and stop it:

Terminal
docker ps
docker stop <container-id>

Use the ID that docker ps lists for analytics-landing. To start again, run the same docker run command; the image is already built.

After you change a file, build the image again before you run it. The image holds a copy of the code from when it was built.

Your own settings

The settings are compiled into the site when the image is built, so they are build arguments, not docker run options. The one to set before going live is your address:

Terminalin Nextjs-landing-page-template-2
docker build -t analytics-landing --build-arg NEXT_PUBLIC_SITE_URL=https://www.your-domain.com .

Next

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.