Details de l’installateur
OpenClaw fournit trois scripts d’installation, servis depuis openclaw.ai.
| Script | Plateforme | Fonction |
|---|---|---|
install.sh | macOS / Linux / WSL | Installe Node si necessaire, installe OpenClaw via npm (par defaut) ou git, et peut lancer l’accueil. |
install-cli.sh | macOS / Linux / WSL | Installe Node + OpenClaw dans un prefixe local (~/.openclaw). Pas besoin de root. |
install.ps1 | Windows (PowerShell) | Installe Node si necessaire, installe OpenClaw via npm (par defaut) ou git, et peut lancer l’accueil. |
Commandes rapides
install.sh
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash
```
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --help
```
install-cli.sh
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash
```
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --help
```
install.ps1
```powershell
iwr -useb https://openclaw.ai/install.ps1 | iex
```
```powershell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -Tag beta -NoOnboard -DryRun
```
Remarque : Si l’installation reussit mais que
openclawest introuvable dans un nouveau terminal, consultez Depannage Node.js.
install.sh
Astuce : Recommande pour la plupart des installations interactives sur macOS/Linux/WSL.
Flux (install.sh)
Etape 1 : Detection de l’OS
Prend en charge macOS et Linux (y compris WSL). Si macOS est detecte, installe Homebrew s'il manque.
Etape 2 : S’assurer de Node.js 24 par defaut
Verifie la version de Node et installe Node 24 si necessaire (Homebrew sur macOS, scripts NodeSource sur Linux apt/dnf/yum). OpenClaw prend toujours en charge Node 22 LTS, actuellement `22.16+`, pour la compatibilite.
Etape 3 : S’assurer de Git
Installe Git s'il manque.
Etape 4 : Installer OpenClaw
- Methode `npm` (par defaut) : installation npm globale
- Methode `git` : clone/met a jour le depot, installe les deps avec pnpm, compile, puis installe le wrapper a `~/.local/bin/openclaw`
Etape 5 : Taches post-installation
- Execute `openclaw doctor --non-interactive` lors des mises a jour et installations git (best effort)
- Tente l'accueil quand c'est appropriate (TTY disponible, accueil non desactive, et verifications de bootstrap/config reussies)
- Definit par defaut `SHARP_IGNORE_GLOBAL_LIBVIPS=1`
Detection du checkout source
Si execute dans un checkout OpenClaw (package.json + pnpm-workspace.yaml), le script propose :
- utiliser le checkout (
git), ou - utiliser l’installation globale (
npm)
Si aucun TTY n’est disponible et qu’aucune methode d’installation n’est definie, il choisit npm par defaut avec un avertissement.
Le script se termine avec le code 2 pour une selection de methode invalide ou des valeurs --install-method invalides.
Exemples (install.sh)
Par defaut
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash
```
Sans accueil
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --no-onboard
```
Installation git
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --install-method git
```
Simulation
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --dry-run
```
Reference des drapeaux
| Drapeau | Description |
|---|---|
--install-method npm|git | Choisir la methode d’installation (par defaut : npm). Alias : --method |
--npm | Raccourci pour la methode npm |
--git | Raccourci pour la methode git. Alias : --github |
--version <version|dist-tag> | Version npm ou dist-tag (par defaut : latest) |
--beta | Utiliser le dist-tag beta si disponible, sinon latest |
--git-dir <path> | Repertoire de checkout (par defaut : ~/openclaw). Alias : --dir |
--no-git-update | Ne pas executer git pull pour un checkout existant |
--no-prompt | Desactiver les invites |
--no-onboard | Ne pas executer l’accueil |
--onboard | Activer l’accueil |
--dry-run | Afficher les actions sans les appliquer |
--verbose | Activer la sortie de debug (set -x, logs npm notice-level) |
--help | Afficher l’aide (-h) |
Reference des variables d'environnement
| Variable | Description |
|---|---|
OPENCLAW_INSTALL_METHOD=git|npm | Methode d’installation |
OPENCLAW_VERSION=latest|next|<semver> | Version npm ou dist-tag |
OPENCLAW_BETA=0|1 | Utiliser beta si disponible |
OPENCLAW_GIT_DIR=<path> | Repertoire de checkout |
OPENCLAW_GIT_UPDATE=0|1 | Activer/desactiver les mises a jour git |
OPENCLAW_NO_PROMPT=1 | Desactiver les invites |
OPENCLAW_NO_ONBOARD=1 | Ne pas executer l’accueil |
OPENCLAW_DRY_RUN=1 | Mode simulation |
OPENCLAW_VERBOSE=1 | Mode debug |
OPENCLAW_NPM_LOGLEVEL=error|warn|notice | Niveau de log npm |
SHARP_IGNORE_GLOBAL_LIBVIPS=0|1 | Controle du comportement sharp/libvips (par defaut : 1) |
install-cli.sh
Info : Concu pour les environnements ou vous voulez tout sous un prefixe local (par defaut
~/.openclaw) sans dependance au Node systeme.
Flux (install-cli.sh)
Etape 1 : Installer le runtime Node local
Telecharge un tarball Node supporte et epingle (actuellement par defaut `22.22.0`) vers `<prefix>/tools/node-v<version>` et verifie le SHA-256.
Etape 2 : S’assurer de Git
Si Git est manquant, tente l'installation via apt/dnf/yum sur Linux ou Homebrew sur macOS.
Etape 3 : Installer OpenClaw sous le prefixe
Installe avec npm en utilisant `--prefix <prefix>`, puis ecrit le wrapper vers `<prefix>/bin/openclaw`.
Exemples (install-cli.sh)
Par defaut
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash
```
Prefixe + version personnalises
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --prefix /opt/openclaw --version latest
```
Sortie JSON pour automatisation
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --json --prefix /opt/openclaw
```
Lancer l’accueil
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --onboard
```
Reference des drapeaux
| Drapeau | Description |
|---|---|
--prefix <path> | Prefixe d’installation (par defaut : ~/.openclaw) |
--version <ver> | Version ou dist-tag OpenClaw (par defaut : latest) |
--node-version <ver> | Version de Node (par defaut : 22.22.0) |
--json | Emettre des evenements NDJSON |
--onboard | Executer openclaw onboard apres l’installation |
--no-onboard | Ne pas executer l’accueil (par defaut) |
--set-npm-prefix | Sur Linux, forcer le prefixe npm a ~/.npm-global si le prefixe actuel n’est pas inscriptible |
--help | Afficher l’aide (-h) |
Reference des variables d'environnement
| Variable | Description |
|---|---|
OPENCLAW_PREFIX=<path> | Prefixe d’installation |
OPENCLAW_VERSION=<ver> | Version ou dist-tag OpenClaw |
OPENCLAW_NODE_VERSION=<ver> | Version de Node |
OPENCLAW_NO_ONBOARD=1 | Ne pas executer l’accueil |
OPENCLAW_NPM_LOGLEVEL=error|warn|notice | Niveau de log npm |
OPENCLAW_GIT_DIR=<path> | Chemin de recherche pour nettoyage legacy (utilise pour supprimer l’ancien checkout submodule Peekaboo) |
SHARP_IGNORE_GLOBAL_LIBVIPS=0|1 | Controle du comportement sharp/libvips (par defaut : 1) |
install.ps1
Flux (install.ps1)
Etape 1 : S’assurer de PowerShell + environnement Windows
Necessite PowerShell 5+.
Etape 2 : S’assurer de Node.js 24 par defaut
S'il manque, tente l'installation via winget, puis Chocolatey, puis Scoop. Node 22 LTS, actuellement `22.16+`, reste pris en charge pour la compatibilite.
Etape 3 : Installer OpenClaw
- Methode `npm` (par defaut) : installation npm globale en utilisant le `-Tag` selectionne
- Methode `git` : clone/met a jour le depot, installe/compile avec pnpm, et installe le wrapper a `%USERPROFILE%\.local\bin\openclaw.cmd`
Etape 4 : Taches post-installation
Ajoute le repertoire bin necessaire au PATH utilisateur quand c'est possible, puis execute `openclaw doctor --non-interactive` lors des mises a jour et installations git (best effort).
Exemples (install.ps1)
Par defaut
```powershell
iwr -useb https://openclaw.ai/install.ps1 | iex
```
Installation git
```powershell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -InstallMethod git
```
Repertoire git personnalise
```powershell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -InstallMethod git -GitDir "C:\openclaw"
```
Simulation
```powershell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -DryRun
```
Trace de debug
```powershell
# install.ps1 n'a pas encore de drapeau -Verbose dedie.
Set-PSDebug -Trace 1
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard
Set-PSDebug -Trace 0
```
Reference des drapeaux
| Drapeau | Description |
|---|---|
-InstallMethod npm|git | Methode d’installation (par defaut : npm) |
-Tag <tag> | Dist-tag npm (par defaut : latest) |
-GitDir <path> | Repertoire de checkout (par defaut : %USERPROFILE%\openclaw) |
-NoOnboard | Ne pas executer l’accueil |
-NoGitUpdate | Ne pas executer git pull |
-DryRun | Afficher les actions uniquement |
Reference des variables d'environnement
| Variable | Description |
|---|---|
OPENCLAW_INSTALL_METHOD=git|npm | Methode d’installation |
OPENCLAW_GIT_DIR=<path> | Repertoire de checkout |
OPENCLAW_NO_ONBOARD=1 | Ne pas executer l’accueil |
OPENCLAW_GIT_UPDATE=0 | Desactiver git pull |
OPENCLAW_DRY_RUN=1 | Mode simulation |
Remarque : Si
-InstallMethod gitest utilise et que Git est manquant, le script se termine et affiche le lien Git for Windows.
CI et automatisation
Utilisez les drapeaux/variables d’environnement non interactifs pour des executions previsibles.
install.sh (npm non-interactif)
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --no-prompt --no-onboard
```
install.sh (git non-interactif)
```bash
OPENCLAW_INSTALL_METHOD=git OPENCLAW_NO_PROMPT=1 \
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash
```
install-cli.sh (JSON)
```bash
curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install-cli.sh | bash -s -- --json --prefix /opt/openclaw
```
install.ps1 (sans accueil)
```powershell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard
```
Depannage
Pourquoi Git est-il necessaire ?
Git est necessaire pour la methode d'installation `git`. Pour les installations `npm`, Git est quand meme verifie/installe pour eviter les echecs `spawn git ENOENT` quand les dependances utilisent des URL git.
Pourquoi npm affiche-t-il EACCES sous Linux ?
Certaines configurations Linux pointent le prefixe global npm vers des chemins appartenant a root. `install.sh` peut basculer le prefixe vers `~/.npm-global` et ajouter les exports PATH aux fichiers rc du shell (quand ces fichiers existent).
Problemes sharp/libvips
Les scripts definissent par defaut `SHARP_IGNORE_GLOBAL_LIBVIPS=1` pour eviter que sharp compile contre le libvips systeme. Pour surcharger :
```bash
SHARP_IGNORE_GLOBAL_LIBVIPS=0 curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash
```
Windows : "npm error spawn git / ENOENT"
Installez Git for Windows, rouvrez PowerShell, relancez l'installateur.
Windows : "openclaw is not recognized"
Executez `npm config get prefix` et ajoutez ce repertoire a votre PATH utilisateur (pas de suffixe `\bin` necessaire sous Windows), puis rouvrez PowerShell.
Windows : comment obtenir la sortie verbeuse de l'installateur
`install.ps1` n'expose pas encore de drapeau `-Verbose`.
Utilisez le tracage PowerShell pour les diagnostics au niveau script :
```powershell
Set-PSDebug -Trace 1
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard
Set-PSDebug -Trace 0
```
openclaw introuvable apres l'installation
C'est generalement un probleme de PATH. Consultez [Depannage Node.js](/docs/install/node#troubleshooting).