Author:
    Creation:2026-09-21Last update:2026-09-21

    Intlayer CLI Init Infra Command

    Description

    The init infra command sets up the Intlayer infrastructure on your machine. It downloads the hosted installer for your platform (https://intlayer.org/install.sh on macOS / Linux, https://intlayer.org/install.ps1 on Windows) and runs it with your terminal attached, so the installer's own menu and progress output reach you unchanged.

    The installer asks how you want to run Intlayer:

    • Desktop app: downloads the native dashboard for your OS and CPU and opens or installs it. The desktop build talks to the Intlayer Cloud backend.
    • All-in-one Docker: dashboard + API + MongoDB + Redis + MinIO in a single container backed by one volume. Writes ./intlayer.env with the secrets generated and pulls the intlayer/cms-all image.
    • Docker Compose: one container per service, for scalable self-hosting. Writes docker-compose.yml and .env into ./intlayer/ and pulls the images.

    The hosted installer is the single source of truth for the setup flow: the CLI runs it rather than re-implementing the same steps, so npx intlayer init infra and curl -fsSL https://intlayer.org/install.sh | sh do exactly the same thing.

    Usage

    bash
    npx intlayer init infra [options]
    

    The same step is offered from the checklist of npx intlayer init --interactive, under Infrastructure (desktop app / self-hosting).

    Options

    • -m, --mode <mode> - Optional. Skip the installer's menu and run one mode directly. Accepted values: desktop, docker (all-in-one) or compose. Any other value exits with an error listing the accepted modes.

    Examples

    Pick the mode interactively

    bash
    npx intlayer init infra
    

    Install the desktop app

    bash
    npx intlayer init infra --mode desktop
    

    Self-host with the all-in-one container

    bash
    npx intlayer init infra --mode docker
    

    Self-host with Docker Compose

    bash
    npx intlayer init infra --mode compose
    

    Example output

    bash
    npx intlayer init infra --mode compose
      Installer downloaded
     Fetching docker-compose.yml into ./intlayer
     Writing ./intlayer/.env
     Pulling images
    
      Everything is installed. Two steps left.
    
      1. Configure a mailer in:
    
           ./intlayer/.env
    
         Either RESEND_API_KEY (resend.com) or the MAIL_SMTP_* block — the first
         account cannot be verified without a working mailer.
      2. Start the stack:
    
           cd ./intlayer && docker compose up -d
    
      Then open http://localhost:3000 first boot initialises the
      datastores, so give it a minute. The first account you create becomes the
      super admin.
    
        Logs      docker compose logs -f
        Stop      docker compose down
        Upgrade   docker compose pull && docker compose up -d
    

    Installer settings

    The installer reads a few environment variables, which the CLI passes through untouched. Set them in your shell before running the command:

    bash
    INTLAYER_COMPOSE_DIR=./cms npx intlayer init infra --mode compose
    
    VariableDefaultApplies toDescription
    INTLAYER_MODE(asked)alldesktop, docker or compose, same as --mode
    INTLAYER_DOWNLOAD_DIR~/DownloadsdesktopWhere the app installer is saved
    INTLAYER_IMAGEintlayer/cms-all:latestdockerAll-in-one image to pull
    INTLAYER_ENV_FILE./intlayer.envdockerWhere to write the environment file
    INTLAYER_CONTAINER_NAMEintlayerdockerContainer name
    INTLAYER_DATA_VOLUMEintlayer-datadockerNamed volume mounted at /data
    INTLAYER_APP_PORT3000dockerHost port for the dashboard
    INTLAYER_API_PORT3100dockerHost port for the API
    INTLAYER_S3_PORT9000dockerHost port for the MinIO S3 API
    INTLAYER_CONSOLE_PORT9001dockerHost port for the MinIO console
    INTLAYER_COMPOSE_DIR./intlayercomposeWhere docker-compose.yml and .env are written
    INTLAYER_SELFHOST_REFmainbothGit ref the compose file and env template are fetched from
    The port variables only change the host side of the mapping. The published images have http://localhost:3000, http://localhost:3100 and http://localhost:9000 compiled into the dashboard bundle, so keep the defaults unless you build your own images: see the self-hosting guide.

    Requirements

    • Desktop app needs Node.js: the app embeds the dashboard's server and starts it with the machine's own node binary.
    • Docker modes need Docker (Docker Desktop with the WSL 2 backend on Windows). The Compose mode also needs the docker compose plugin.

    Notes

    • Re-running the command is safe: an existing environment file is never overwritten, so it doubles as the upgrade path (the installer pulls the latest images and keeps your secrets).
    • The installer is downloaded to a temporary directory and deleted once it exits, whatever the outcome.
    • The command's exit code is the installer's. If the download itself fails, the CLI prints the equivalent curl … | sh (or irm … | iex) command so you can run the installer directly.
    • The Docker modes still need a mailer to send sign-in emails. After the installer finishes, configure Resend or SMTP in the generated environment file: see Global mailer.