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

# Docker Deployment

> Deploy Blocklight using Docker Compose for production

Blocklight uses Docker Compose for production deployments. Choose the setup that fits your needs:

## Option 1: Core Only (Recommended)

Deploy just the runtime security engine with alerts. Perfect for most users.

```bash theme={null}
# Start core runtime security engine
docker-compose up -d

# Verify it's running
docker-compose ps
docker-compose logs -f blocklight-core
```

<Note>
  **What you get:**

  * Runtime security engine monitoring blockchain
  * Real-time threat alerts (Slack, Discord, Email, etc.)
  * gRPC server for internal communication
</Note>

## Option 2: Core + REST API

Add HTTP endpoints for dashboards, notebooks, or custom integrations.

```bash theme={null}
# Start with API enabled
docker-compose --profile api up -d

# Check API health
curl http://localhost:8000/health

# View API logs
docker-compose logs -f blocklight-api
```

## Option 3: Full Stack with Observability

Deploy Core + API + Observability stack (Vector, Loki, Grafana, Prometheus) for production monitoring.

```bash theme={null}
# Start everything
docker-compose --profile observability up -d

# Access Grafana (dashboards)
open http://localhost:3000

# Access Prometheus (metrics)
open http://localhost:9090
```

<Warning>
  **Important:** Prometheus monitors *Blocklight's health* (uptime, performance). Blockchain threat alerts are sent via Slack/Discord/Email regardless of which deployment option you choose.
</Warning>

## Managing Services

Common Docker Compose commands:

```bash theme={null}
# Stop services (keeps data)
docker-compose down

# Stop and remove all data
docker-compose down -v

# Restart after config.yaml changes (NOT needed for rule changes!)
docker-compose restart blocklight-core

# View all logs
docker-compose logs -f

# Follow rules reload in real-time
docker-compose logs -f blocklight-core | grep -i "reload\|rule"
```

<Note>
  **When to Restart:**

  * After changing `config/config.yaml`
  * After changing alert webhooks or network URLs
  * Not needed: After adding/editing rules (hot reload handles this)
</Note>
