Installér¶
Allerede fulgt Kom i gang? Du er alle indstillet — denne side er til alternative installationsmetoder, platform-specifikke instruktioner og vedligeholdelse.
Systemkrav¶
- Node 22+ (installationsscriptet vil installere det, hvis det mangler)
- macOS, Linux eller Windows
pnpmkun hvis du bygger fra kilde
Installationsmetoder¶
```
<Tabs>
<Tab title="macOS / Linux / WSL2">
```bash
curl -fsSL https://openclaw.ai/install.sh | bash
```
</Tab>
<Tab title="Windows (PowerShell)">
```powershell
iwr -useb https://openclaw.ai/install.ps1 | iex
```
</Tab>
</Tabs>
Det er det — scriptet håndterer Node-detektion, installation og introduktion.
For at springe introduktionen over og kun installere binæren:
<Tabs>
<Tab title="macOS / Linux / WSL2">
```bash
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
```
</Tab>
<Tab title="Windows (PowerShell)">
```powershell
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard
```
</Tab>
</Tabs>
For alle flag, miljøvariabler og CI/automationsmuligheder, se [Installer internals](/install/installer).
```
```
<Tabs>
<Tab title="npm">
```bash
npm install -g openclaw@latest
openclaw onboard --install-daemon
```
<Accordion title="sharp build-fejl?">
Hvis du har libvips installeret globalt (almindeligt på macOS via Homebrew) og `sharp` fejler, så gennemtving forbyggede binærer:
```bash
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest
```
Hvis du ser `sharp: Please add node-gyp to your dependencies`, skal du enten installere build-værktøjer (macOS: Xcode CLT + `npm install -g node-gyp`) eller bruge miljøvariablen ovenfor.
</Accordion>
</Tab>
<Tab title="pnpm">
```bash
pnpm add -g openclaw@latest
pnpm approve-builds -g # approve openclaw, node-llama-cpp, sharp, etc.
openclaw onboard --install-daemon
```
<Note>
pnpm kræver eksplicit godkendelse af pakker med build-scripts. Når den første installation viser advarslen "Ignored build scripts", kør `pnpm approve-builds -g` og vælg de listede pakker.
</Note>
</Tab>
</Tabs>
```
```
<Steps>
<Step title="Klon og byg">
Klon [OpenClaw-repoet](https://github.com/openclaw/openclaw) og byg:
```bash
git clone https://github.com/openclaw/openclaw.git
cd openclaw
pnpm install
pnpm ui:build
pnpm build
```
</Step>
<Step title="Link CLI’en">
Gør `openclaw`-kommandoen tilgængelig globalt:
```bash
pnpm link --global
```
Alternativt kan du springe linket over og køre kommandoer via `pnpm openclaw ...` inde fra repoet.
</Step>
<Step title="Kør introduktion">
```bash
openclaw onboard --install-daemon
```
</Step>
</Steps>
For dybere udviklingsarbejdsgange, se [Opsætning](/start/setup).
```
Andre installationsmetoder¶
Efter installation¶
Bekræft, at alt fungerer:
openclaw doctor # check for config issues
openclaw status # gateway status
openclaw dashboard # open the browser UI
If you need custom runtime paths, use:
OPENCLAW_HOMEfor home-directory based internal pathsOPENCLAW_STATE_DIRfor mutable state locationOPENCLAW_CONFIG_PATHfor config file location
See Environment vars for precedence and full details.
Fejlfinding: openclaw ikke fundet¶
node -v
npm -v
npm prefix -g
echo "$PATH"
Hvis $(npm prefix -g)/bin (macOS/Linux) eller $(npm prefix -g) (Windows) ikke er i din $PATH, kan din shell ikke finde globale npm-binærer (inklusive openclaw).
Rettelse — tilføj den til din shell-opstartsfil (~/.zshrc eller ~/.bashrc):
export PATH="$(npm prefix -g)/bin:$PATH"
På Windows skal du tilføje outputtet af npm prefix -g til din PATH.
Åbn derefter en ny terminal (eller rehash i zsh / hash -r i bash).