Ask your question and get a summary of the document by referencing this page and the AI provider of your choice
Version History
- "Add init infra command"v9.5.69/21/2026
If you have an idea for improving this documentation, please feel free to contribute by submitting a pull request on GitHub.
GitHub link to the documentationCopy doc Markdown to clipboard
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.envwith the secrets generated and pulls theintlayer/cms-allimage. - Docker Compose: one container per service, for scalable self-hosting. Writes
docker-compose.ymland.envinto./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
Copy the code to the clipboard
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) orcompose. Any other value exits with an error listing the accepted modes.
Examples
Pick the mode interactively
Copy the code to the clipboard
Install the desktop app
Copy the code to the clipboard
Self-host with the all-in-one container
Copy the code to the clipboard
Self-host with Docker Compose
Copy the code to the clipboard
Example output
Copy the code to the clipboard
Installer settings
The installer reads a few environment variables, which the CLI passes through untouched. Set them in your shell before running the command:
Copy the code to the clipboard
Open the table in a modal to view all data content clearly
| Variable | Default | Applies to | Description |
|---|---|---|---|
INTLAYER_MODE | (asked) | all | desktop, docker or compose, same as --mode |
INTLAYER_DOWNLOAD_DIR | ~/Downloads | desktop | Where the app installer is saved |
INTLAYER_IMAGE | intlayer/cms-all:latest | docker | All-in-one image to pull |
INTLAYER_ENV_FILE | ./intlayer.env | docker | Where to write the environment file |
INTLAYER_CONTAINER_NAME | intlayer | docker | Container name |
INTLAYER_DATA_VOLUME | intlayer-data | docker | Named volume mounted at /data |
INTLAYER_APP_PORT | 3000 | docker | Host port for the dashboard |
INTLAYER_API_PORT | 3100 | docker | Host port for the API |
INTLAYER_S3_PORT | 9000 | docker | Host port for the MinIO S3 API |
INTLAYER_CONSOLE_PORT | 9001 | docker | Host port for the MinIO console |
INTLAYER_COMPOSE_DIR | ./intlayer | compose | Where docker-compose.yml and .env are written |
INTLAYER_SELFHOST_REF | main | both | Git ref the compose file and env template are fetched from |
The port variables only change the host side of the mapping. The published images havehttp://localhost:3000,http://localhost:3100andhttp://localhost:9000compiled 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
nodebinary. - Docker modes need Docker (Docker Desktop with the WSL 2 backend on Windows). The Compose mode also needs the
docker composeplugin.
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(orirm … | 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.
Related
- Self-hosting guide - Architecture, first-run steps and limitations of each mode
- Initialize Intlayer - The parent
initcommand and its interactive checklist - Intlayer CMS - What the dashboard you just installed does
