> ## Documentation Index
> Fetch the complete documentation index at: https://bollyai.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Docker Installation

> Run Bolly in a container with persistent storage and automatic restarts

Docker is the recommended way to run Bolly on servers or when you want isolated, reproducible deployments with easy updates.

## Prerequisites

* Docker Engine 20+ or Docker Desktop
* An Anthropic API key ([console.anthropic.com](https://console.anthropic.com))

## Quick start

```bash theme={null}
docker run -d \
  --name bolly \
  -p 26559:26559 \
  -v bolly-data:/data \
  -e BOLLY_HOME=/data \
  --restart always \
  ghcr.io/triangle-int/bolly:latest
```

Open [http://localhost:26559](http://localhost:26559) in your browser. Bolly will guide you through the initial setup — including entering your API key — right in the web interface.

## Docker Compose

For a more manageable setup, use Docker Compose:

```yaml docker-compose.yml theme={null}
services:
  bolly:
    image: ghcr.io/triangle-int/bolly:latest
    container_name: bolly
    ports:
      - "26559:26559"
    volumes:
      - bolly-data:/data
    environment:
      - BOLLY_HOME=/data
    restart: always

volumes:
  bolly-data:
```

Run it:

```bash theme={null}
docker compose up -d
```

## Managing the container

### View logs

```bash theme={null}
docker logs bolly -f
```

### Stop Bolly

```bash theme={null}
docker stop bolly
```

### Start Bolly

```bash theme={null}
docker start bolly
```

### Restart after config changes

```bash theme={null}
docker restart bolly
```

### Remove the container (preserves data)

```bash theme={null}
docker rm -f bolly
```

## Updating

Pull the latest image and recreate the container:

```bash theme={null}
docker compose pull
docker compose up -d
```

Your data is stored in the `bolly-data` volume and persists across updates. See the [full updating guide](/docs/installation/updating) for version pinning and release channels.

## Custom port

To run Bolly on a different port, change the host port mapping:

```bash theme={null}
docker run -d \
  --name bolly \
  -p 3000:26559 \
  -v bolly-data:/data \
  -e BOLLY_HOME=/data \
  --restart always \
  ghcr.io/triangle-int/bolly:latest
```

Bolly would then be available at [http://localhost:3000](http://localhost:3000).

## Running behind a reverse proxy

If running Bolly behind Nginx, Caddy, or another reverse proxy, ensure WebSocket support is enabled — Bolly uses WebSockets for real-time communication.

Example Nginx config:

```nginx theme={null}
server {
    listen 443 ssl;
    server_name bolly.yourdomain.com;

    location / {
        proxy_pass http://localhost:26559;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}
```

## Next steps

<CardGroup cols={2}>
  <Card title="Configuration" icon="gear" href="/docs/installation/configuration">
    Customize personality, heartbeat, and memory settings.
  </Card>

  <Card title="API Keys" icon="key" href="/docs/installation/api-keys">
    Learn about optional integrations beyond the Anthropic key.
  </Card>
</CardGroup>
