# Setup

## Overview

The documentation covers installation and configuration of OpenClaw, an agent system with multiple deployment options.

## Key Setup Strategies

### Configuration Storage

Personal settings live outside the repository in:
- `~/.openclaw/openclaw.json`
- `~/.openclaw/workspace`

This separation ensures updates don't overwrite customizations.

### Two Main Workflows

1. **Stable approach**: Install the macOS application, which manages the bundled Gateway automatically.

2. **Development approach**: Run the Gateway manually with `pnpm gateway:watch` for hot-reloading TypeScript changes, then connect the macOS app in Local mode.

## Prerequisites & Bootstrap

Requirements:
- Node >= 22
- pnpm
- Optionally Docker

Initial setup uses `openclaw setup` to bootstrap the workspace structure.

## Important File Locations

- **Credentials**: `~/.openclaw/credentials/`
- **Sessions**: `~/.openclaw/agents/<agentId>/sessions/`
- **Logs**: `/tmp/openclaw/`

The default Gateway WebSocket port is `ws://127.0.0.1:18789`.

## Linux Considerations

On Linux systems using systemd, the user service may stop on logout. The setup process attempts to enable lingering automatically, though manual configuration via the following command may be necessary for always-on systems:

```bash
sudo loginctl enable-linger $USER
```
