# Install Bindplane Server in Docker Compose

This guide explains how to install and configure Bindplane using Docker Compose. Docker Compose provides an easy way to manage and run Bindplane in a containerized environment.

This setup is intended for development and testing purposes.

## Prerequisites

Before installing Bindplane, ensure you have:

* Docker installed (version 20.10.0 or later)
* Docker Compose installed (version 2.0.0 or later)
* At least 2 CPU cores and 4GB of RAM available
* Ports 3001 available for Bindplane
* A valid [Bindplane license](https://bindplane.com/download)

## Step 1: Create Docker Compose Configuration

Create a `docker-compose.yaml` file. Go to the [Download page](https://bindplane.com/download), select Docker as your platform, copy the content and paste it into your `docker-compose.yaml` file.

```yaml
version: "3"

volumes:
  bindplane:
  prometheus:

services:
  bindplane:
    container_name: bindplane-server
    restart: always
    image: ghcr.io/observiq/bindplane-ee:1.89.5
    ports:
      - "3001:3001"
    environment:
      - BINDPLANE_LICENSE=YOUR_LICENSE_KEY
      - BINDPLANE_USERNAME=admin
      - BINDPLANE_PASSWORD=admin
      - BINDPLANE_REMOTE_URL=http://localhost:3001
      - BINDPLANE_SESSION_SECRET=$(uuidgen)
      - BINDPLANE_LOG_OUTPUT=stdout
      - BINDPLANE_ACCEPT_EULA=true
      - BINDPLANE_PROMETHEUS_ENABLE=true
      - BINDPLANE_PROMETHEUS_ENABLE_REMOTE=true
      - BINDPLANE_PROMETHEUS_HOST=prometheus
      - BINDPLANE_PROMETHEUS_PORT=9090
      - BINDPLANE_TRANSFORM_AGENT_ENABLE_REMOTE=true
      - BINDPLANE_TRANSFORM_AGENT_REMOTE_AGENTS=transform:4568
      - BINDPLANE_STORE_TYPE=postgres
      - BINDPLANE_POSTGRES_HOST=postgres
      - BINDPLANE_POSTGRES_PORT=5432
      - BINDPLANE_POSTGRES_DATABASE=bindplane
      - BINDPLANE_POSTGRES_USERNAME=bindplane
      - BINDPLANE_POSTGRES_PASSWORD=password
    depends_on:
      - postgres
      - prometheus
      - transform

  postgres:
    container_name: bindplane-postgres
    restart: always
    image: postgres:16
    environment:
      - POSTGRES_DB=bindplane
      - POSTGRES_USER=bindplane
      - POSTGRES_PASSWORD=password
    volumes:
      - bindplane:/var/lib/postgresql/data

  prometheus:
    container_name: bindplane-prometheus
    restart: always
    image: ghcr.io/observiq/bindplane-prometheus:1.89.5
    volumes:
      - prometheus:/prometheus

  transform:
    container_name: bindplane-transform-agent
    restart: always
    image: ghcr.io/observiq/bindplane-transform-agent:1.89.5-bindplane
```

## Step 2: Configure Environment Variables

Replace the placeholder with your real values:

* `BINDPLANE_LICENSE` should be set to your license key.
* `BINDPLANE_REMOTE_URL` should be set to the Docker host's IP address, hostname, or external load balancer. This endpoint is used by agents to communicate with Bindplane for OpAMP and Measurements. `localhost` is sufficient for testing on your local machine only.
* `BINDPLANE_USERNAME` and `BINDPLANE_PASSWORD` should be set to something secure and unique.
* `BINDPLANE_POSTGRES_PASSWORD` in the bindplane service and `POSTGRES_PASSWORD` in the postgres service should be set to something secure.

## Step 3: Start Bindplane

Start the Bindplane service:

```bash
docker-compose up -d
```

Verify that the container is running:

```bash
docker-compose ps
```

View logs for troubleshooting:

```bash
docker compose logs -f
```

## Step 4: Access Bindplane

Once the container is running, you can access Bindplane:

* Bindplane UI: `http://localhost:3001`
* Prometheus UI: `http://localhost:9090`

## Step 5: Stopping the Services

```bash
# Stop all services
docker compose down

# Stop and remove volumes (this will delete all data)
docker compose down -v
```

## Troubleshooting

### Common Issues

1. **PostgreSQL fails to start**
   * Check if port 5432 is already in use
   * Ensure you have proper permissions for the data volume
2. **Bindplane fails to connect to PostgreSQL**
   * Wait for PostgreSQL to fully initialize
   * Check the PostgreSQL logs: `docker compose logs postgres`
3. **Transform agent connection issues**
   * Verify the transform agent is running: `docker compose ps transform`
   * Check transform agent logs: `docker compose logs transform`

## Viewing Logs

```bash
# View logs for a specific service
docker compose logs -f bindplane
docker compose logs -f postgres
docker compose logs -f transform
docker compose logs -f prometheus

# View all logs
docker compose logs -f
```

## Data Persistence

Data is persisted in Docker volumes:

* PostgreSQL data: `bindplane` volume
* Prometheus data: `prometheus` volume

To back up your data, you can use Docker volume backup commands:

```bash
docker run --rm -v bindplane:/data -v $(pwd):/backup alpine tar czf /backup/bindplane-backup.tar.gz /data
```

## Container Image Repositories

Bindplane container images can be found in the following locations:

* Github Packages: `ghcr.io/observiq/bindplane-ee`
* Google Artifact Repository: `us-central1-docker.pkg.dev/observiq-containers/bindplane/bindplane-ee`
* Docker Hub: `observiq/bindplane-ee`

Container images are tagged with the release version. For example, Release `v1.35.0` will have the tag `observiq/bindplane-ee:1.35.0`.

## Security Notes

* This configuration uses default passwords for PostgreSQL. In a production environment, you should change these.
* The default configuration exposes ports to localhost only.
* Sensitive information should be stored in environment variables or secrets management.
* Generate unique UUIDs for `BINDPLANE_SESSIONS_SECRET`.

## Additional Resources

* [Bindplane Documentation](/readme.md)
* [Docker Compose Documentation](https://docs.docker.com/compose/)

## Next Steps

After installing Bindplane:

* [Configure collectors](/deployment/docker/collector/install-bdot-collector-in-docker-compose.md)
* [Set up monitoring](/production-checklist/bindplane-otel-collector/monitoring.md)
* [Configure high availability](/production-checklist/bindplane-otel-collector/high-availability.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bindplane.com/deployment/docker/server/install-bindplane-in-docker-compose.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
